mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
Merge pull request #2845 from lakkatv/master
(XMB) Add support for the RetroActive theme
This commit is contained in:
commit
d818578076
@ -427,7 +427,7 @@ static void gl_raster_font_restore_viewport(gl_t *gl)
|
||||
static void gl_raster_font_render_msg(void *data, const char *msg,
|
||||
const void *userdata)
|
||||
{
|
||||
GLfloat x, y, scale, drop_mod;
|
||||
GLfloat x, y, scale, drop_mod, drop_alpha;
|
||||
GLfloat color[4], color_dark[4];
|
||||
int drop_x, drop_y;
|
||||
bool full_screen;
|
||||
@ -455,6 +455,7 @@ static void gl_raster_font_render_msg(void *data, const char *msg,
|
||||
drop_x = params->drop_x;
|
||||
drop_y = params->drop_y;
|
||||
drop_mod = params->drop_mod;
|
||||
drop_alpha = params->drop_alpha;
|
||||
|
||||
color[0] = FONT_COLOR_GET_RED(params->color) / 255.0f;
|
||||
color[1] = FONT_COLOR_GET_GREEN(params->color) / 255.0f;
|
||||
@ -481,6 +482,7 @@ static void gl_raster_font_render_msg(void *data, const char *msg,
|
||||
drop_x = -2;
|
||||
drop_y = -2;
|
||||
drop_mod = 0.3f;
|
||||
drop_alpha = 1.0f;
|
||||
}
|
||||
|
||||
if (font && font->block)
|
||||
@ -493,7 +495,7 @@ static void gl_raster_font_render_msg(void *data, const char *msg,
|
||||
color_dark[0] = color[0] * drop_mod;
|
||||
color_dark[1] = color[1] * drop_mod;
|
||||
color_dark[2] = color[2] * drop_mod;
|
||||
color_dark[3] = color[3];
|
||||
color_dark[3] = color[3] * drop_alpha;
|
||||
|
||||
gl_raster_font_render_message(font, msg, scale, color_dark,
|
||||
x + scale * drop_x / gl->vp.width, y +
|
||||
|
@ -253,7 +253,7 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font)
|
||||
static void vulkan_raster_font_render_msg(void *data, const char *msg,
|
||||
const void *userdata)
|
||||
{
|
||||
float x, y, scale, drop_mod;
|
||||
float x, y, scale, drop_mod, drop_alpha;
|
||||
float color[4], color_dark[4];
|
||||
int drop_x, drop_y;
|
||||
bool full_screen;
|
||||
@ -279,6 +279,7 @@ static void vulkan_raster_font_render_msg(void *data, const char *msg,
|
||||
drop_x = params->drop_x;
|
||||
drop_y = params->drop_y;
|
||||
drop_mod = params->drop_mod;
|
||||
drop_alpha = params->drop_alpha;
|
||||
|
||||
color[0] = FONT_COLOR_GET_RED(params->color) / 255.0f;
|
||||
color[1] = FONT_COLOR_GET_GREEN(params->color) / 255.0f;
|
||||
@ -305,6 +306,7 @@ static void vulkan_raster_font_render_msg(void *data, const char *msg,
|
||||
drop_x = -2;
|
||||
drop_y = -2;
|
||||
drop_mod = 0.3f;
|
||||
drop_alpha = 1.0f;
|
||||
}
|
||||
|
||||
vulkan_raster_font_setup_viewport(font, full_screen);
|
||||
@ -325,7 +327,7 @@ static void vulkan_raster_font_render_msg(void *data, const char *msg,
|
||||
color_dark[0] = color[0] * drop_mod;
|
||||
color_dark[1] = color[1] * drop_mod;
|
||||
color_dark[2] = color[2] * drop_mod;
|
||||
color_dark[3] = color[3];
|
||||
color_dark[3] = color[3] * drop_alpha;
|
||||
|
||||
vulkan_raster_font_render_message(font, msg, scale, color_dark,
|
||||
x + scale * drop_x / vk->vp.width, y +
|
||||
|
@ -85,6 +85,8 @@ struct font_params
|
||||
/* Drop shadow offset.
|
||||
* If both are 0, no drop shadow will be rendered. */
|
||||
int drop_x, drop_y;
|
||||
/* Drop shadow alpha */
|
||||
float drop_alpha;
|
||||
/* ABGR. Use the macros. */
|
||||
uint32_t color;
|
||||
bool full_screen;
|
||||
|
@ -611,6 +611,9 @@ static void menu_action_setting_disp_set_label_xmb_theme(
|
||||
snprintf(s, len, "%s", "FlatUI");
|
||||
break;
|
||||
case 2:
|
||||
snprintf(s, len, "%s", "RetroActive");
|
||||
break;
|
||||
case 3:
|
||||
snprintf(s, len, "%s", "Custom");
|
||||
break;
|
||||
}
|
||||
|
@ -237,6 +237,8 @@ static const char *xmb_theme_ident(void)
|
||||
case 1:
|
||||
return "flatui";
|
||||
case 2:
|
||||
return "retroactive";
|
||||
case 3:
|
||||
return "custom";
|
||||
default:
|
||||
break;
|
||||
@ -398,7 +400,7 @@ static void xmb_draw_icon_predone(xmb_handle_t *xmb,
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
shadow[i] = 0;
|
||||
shadow[3] = shadow[7] = shadow[11] = shadow[15] = color[3];
|
||||
shadow[3] = shadow[7] = shadow[11] = shadow[15] = color[3]/4;
|
||||
|
||||
coords.color = shadow;
|
||||
draw.x = x + 2;
|
||||
@ -521,6 +523,7 @@ static void xmb_draw_text(xmb_handle_t *xmb,
|
||||
{
|
||||
params.drop_x = 2.0f;
|
||||
params.drop_y = -2.0f;
|
||||
params.drop_alpha = 0.25f;
|
||||
}
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_BUF, &disp_buf);
|
||||
|
@ -5873,7 +5873,7 @@ static bool setting_append_list(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
Loading…
Reference in New Issue
Block a user