mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
ozone: use menu_display_set_alpha
This commit is contained in:
parent
dac31786ea
commit
4e79f13139
@ -1228,7 +1228,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Cursor */
|
||||
if (ozone->show_cursor)
|
||||
{
|
||||
ozone_color_alpha(ozone_pure_white, 1.0f);
|
||||
menu_display_set_alpha(ozone_pure_white, 1.0f);
|
||||
menu_display_draw_cursor(
|
||||
video_info,
|
||||
ozone_pure_white,
|
||||
|
@ -122,8 +122,8 @@ static void ozone_draw_cursor_slice(ozone_handle_t *ozone,
|
||||
unsigned width, unsigned height,
|
||||
size_t y, float alpha)
|
||||
{
|
||||
ozone_color_alpha(ozone->theme_dynamic.cursor_alpha, alpha);
|
||||
ozone_color_alpha(ozone->theme_dynamic.cursor_border, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.cursor_alpha, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.cursor_border, alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
|
||||
@ -164,8 +164,8 @@ static void ozone_draw_cursor_fallback(ozone_handle_t *ozone,
|
||||
unsigned width, unsigned height,
|
||||
size_t y, float alpha)
|
||||
{
|
||||
ozone_color_alpha(ozone->theme_dynamic.selection_border, alpha);
|
||||
ozone_color_alpha(ozone->theme_dynamic.selection, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.selection_border, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.selection, alpha);
|
||||
|
||||
/* Fill */
|
||||
menu_display_draw_quad(video_info, x_offset, y, width, height - 5, video_info->width, video_info->height, ozone->theme_dynamic.selection);
|
||||
@ -197,11 +197,6 @@ void ozone_draw_cursor(ozone_handle_t *ozone,
|
||||
ozone_draw_cursor_fallback(ozone, video_info, x_offset, width, height, y, alpha);
|
||||
}
|
||||
|
||||
void ozone_color_alpha(float *color, float alpha)
|
||||
{
|
||||
color[3] = color[7] = color[11] = color[15] = alpha;
|
||||
}
|
||||
|
||||
void ozone_draw_icon(
|
||||
video_frame_info_t *video_info,
|
||||
unsigned icon_width,
|
||||
@ -250,7 +245,7 @@ void ozone_draw_icon(
|
||||
void ozone_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
{
|
||||
/* TODO: Replace this backdrop by a blur shader on the whole screen if available */
|
||||
ozone_color_alpha(ozone_backdrop, alpha);
|
||||
menu_display_set_alpha(ozone_backdrop, alpha);
|
||||
menu_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, ozone_backdrop);
|
||||
}
|
||||
|
||||
@ -390,7 +385,7 @@ void ozone_draw_messagebox(ozone_handle_t *ozone,
|
||||
}
|
||||
}
|
||||
|
||||
ozone_color_alpha(ozone->theme_dynamic.message_background, ozone->animations.messagebox_alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.message_background, ozone->animations.messagebox_alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
|
||||
|
@ -37,8 +37,6 @@ void ozone_draw_cursor(ozone_handle_t *ozone,
|
||||
unsigned width, unsigned height,
|
||||
size_t y, float alpha);
|
||||
|
||||
void ozone_color_alpha(float *color, float alpha);
|
||||
|
||||
void ozone_draw_icon(
|
||||
video_frame_info_t *video_info,
|
||||
unsigned icon_width,
|
||||
|
@ -339,8 +339,8 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
|
||||
else if (y + scroll_y - node->height - 20 > bottom_boundary)
|
||||
goto border_iterate;
|
||||
|
||||
ozone_color_alpha(ozone->theme_dynamic.entries_border, alpha);
|
||||
ozone_color_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.entries_border, alpha);
|
||||
menu_display_set_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
|
||||
|
||||
/* Borders */
|
||||
menu_display_draw_quad(video_info, ozone->dimensions.sidebar_width + x_offset + entry_padding,
|
||||
@ -456,7 +456,7 @@ border_iterate:
|
||||
icon_color = ozone_pure_white;
|
||||
}
|
||||
|
||||
ozone_color_alpha(icon_color, alpha);
|
||||
menu_display_set_alpha(icon_color, alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info, ozone->dimensions.entry_icon_size, ozone->dimensions.entry_icon_size, texture,
|
||||
@ -465,7 +465,7 @@ border_iterate:
|
||||
menu_display_blend_end(video_info);
|
||||
|
||||
if (icon_color == ozone_pure_white)
|
||||
ozone_color_alpha(icon_color, 1.0f);
|
||||
menu_display_set_alpha(icon_color, 1.0f);
|
||||
|
||||
text_offset = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user