mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Merge pull request #2867 from lakkatv/master
(XMB) Apply the fade in animation on the ribbon when launching RA or…
This commit is contained in:
commit
a8032a6c4c
@ -1900,7 +1900,8 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_draw_ribbon(menu_display_ctx_draw_t *draw)
|
static void xmb_draw_ribbon(xmb_handle_t *xmb,
|
||||||
|
menu_display_ctx_draw_t *draw)
|
||||||
{
|
{
|
||||||
#ifdef XMB_RIBBON_ENABLE
|
#ifdef XMB_RIBBON_ENABLE
|
||||||
struct uniform_info uniform_param = {0};
|
struct uniform_info uniform_param = {0};
|
||||||
@ -1909,13 +1910,23 @@ static void xmb_draw_ribbon(menu_display_ctx_draw_t *draw)
|
|||||||
video_shader_ctx_info_t shader_info;
|
video_shader_ctx_info_t shader_info;
|
||||||
math_matrix_4x4 mymat;
|
math_matrix_4x4 mymat;
|
||||||
struct gfx_coords coords;
|
struct gfx_coords coords;
|
||||||
|
|
||||||
float white[16] = {
|
float white[16] = {
|
||||||
1, 1, 1, 1,
|
1, 1, 1, xmb->alpha,
|
||||||
1, 1, 1, 1,
|
1, 1, 1, xmb->alpha,
|
||||||
1, 1, 1, 1,
|
1, 1, 1, xmb->alpha,
|
||||||
1, 1, 1, 1,
|
1, 1, 1, xmb->alpha,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
float gradient[16] = {
|
||||||
|
1 , 0 , 0.1 , xmb->alpha,
|
||||||
|
1 , 0.1, 0 , xmb->alpha,
|
||||||
|
0.05, 0 , 0.05, xmb->alpha,
|
||||||
|
0.05, 0 , 0.05, xmb->alpha,
|
||||||
|
};
|
||||||
|
|
||||||
|
draw->color = gradient;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw);
|
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw);
|
||||||
|
|
||||||
xmb_blend_begin();
|
xmb_blend_begin();
|
||||||
@ -1957,12 +1968,12 @@ static void xmb_draw_ribbon(menu_display_ctx_draw_t *draw)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_draw_bg(menu_display_ctx_draw_t *draw)
|
static void xmb_draw_bg(xmb_handle_t *xmb, menu_display_ctx_draw_t *draw)
|
||||||
{
|
{
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
||||||
|
|
||||||
xmb_draw_ribbon(draw);
|
xmb_draw_ribbon(xmb, draw);
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
}
|
}
|
||||||
@ -2037,7 +2048,7 @@ static void xmb_frame(void *data)
|
|||||||
&& !draw.force_transparency && draw.texture)
|
&& !draw.force_transparency && draw.texture)
|
||||||
draw.color = &coord_color2[0];
|
draw.color = &coord_color2[0];
|
||||||
|
|
||||||
xmb_draw_bg(&draw);
|
xmb_draw_bg(xmb, &draw);
|
||||||
|
|
||||||
xmb_draw_text(xmb,
|
xmb_draw_text(xmb,
|
||||||
xmb->title_name, xmb->margins.title.left,
|
xmb->title_name, xmb->margins.title.left,
|
||||||
@ -2176,7 +2187,7 @@ static void xmb_frame(void *data)
|
|||||||
&& !draw.force_transparency && draw.texture)
|
&& !draw.force_transparency && draw.texture)
|
||||||
draw.color = &coord_color2[0];
|
draw.color = &coord_color2[0];
|
||||||
|
|
||||||
xmb_draw_bg(&draw);
|
xmb_draw_bg(xmb, &draw);
|
||||||
|
|
||||||
xmb_render_messagebox_internal(xmb, msg);
|
xmb_render_messagebox_internal(xmb, msg);
|
||||||
}
|
}
|
||||||
|
@ -503,12 +503,6 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
|||||||
const float *new_vertex = NULL;
|
const float *new_vertex = NULL;
|
||||||
const float *new_tex_coord = NULL;
|
const float *new_tex_coord = NULL;
|
||||||
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
||||||
float bg[16] = {
|
|
||||||
1, 0, 0.1, 1,
|
|
||||||
1, 0.1, 0, 1,
|
|
||||||
0.05, 0, 0.05, 1,
|
|
||||||
0.05, 0, 0.05, 1
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!menu_disp || !draw)
|
if (!menu_disp || !draw)
|
||||||
return false;
|
return false;
|
||||||
@ -525,7 +519,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
|||||||
coords.vertex = new_vertex;
|
coords.vertex = new_vertex;
|
||||||
coords.tex_coord = new_tex_coord;
|
coords.tex_coord = new_tex_coord;
|
||||||
coords.lut_tex_coord = new_tex_coord;
|
coords.lut_tex_coord = new_tex_coord;
|
||||||
coords.color = bg;
|
coords.color = (const float*)draw->color;
|
||||||
|
|
||||||
draw->x = 0;
|
draw->x = 0;
|
||||||
draw->y = 0;
|
draw->y = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user