mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
gfx_display_draw_quad - no longer dependent on video_frame_info
This commit is contained in:
parent
b24d1f06aa
commit
d72596142e
@ -829,7 +829,9 @@ void gfx_display_draw_gradient(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
void gfx_display_draw_quad(
|
||||
video_frame_info_t *video_info,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color)
|
||||
@ -844,7 +846,7 @@ void gfx_display_draw_quad(
|
||||
coords.color = color;
|
||||
|
||||
if (dispctx && dispctx->blend_begin)
|
||||
dispctx->blend_begin(video_info->userdata);
|
||||
dispctx->blend_begin(data);
|
||||
|
||||
draw.x = x;
|
||||
draw.y = (int)height - y - (int)h;
|
||||
@ -858,11 +860,11 @@ void gfx_display_draw_quad(
|
||||
draw.scale_factor = 1.0f;
|
||||
draw.rotation = 0.0f;
|
||||
|
||||
gfx_display_draw(&draw, video_info->userdata,
|
||||
video_info->width, video_info->height);
|
||||
gfx_display_draw(&draw, data,
|
||||
video_width, video_height);
|
||||
|
||||
if (dispctx && dispctx->blend_end)
|
||||
dispctx->blend_end(video_info->userdata);
|
||||
dispctx->blend_end(data);
|
||||
}
|
||||
|
||||
void gfx_display_draw_polygon(
|
||||
@ -1595,6 +1597,7 @@ void gfx_display_draw_keyboard(
|
||||
{
|
||||
unsigned i;
|
||||
int ptr_width, ptr_height;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
|
||||
@ -1606,7 +1609,8 @@ void gfx_display_draw_keyboard(
|
||||
};
|
||||
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
width, height,
|
||||
0, height/2.0, width, height/2.0,
|
||||
width, height,
|
||||
&osk_dark[0]);
|
||||
|
@ -293,11 +293,15 @@ void gfx_display_draw_bg(
|
||||
void gfx_display_draw_gradient(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
video_frame_info_t *video_info);
|
||||
|
||||
void gfx_display_draw_quad(
|
||||
video_frame_info_t *video_info,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color);
|
||||
|
||||
void gfx_display_draw_polygon(
|
||||
video_frame_info_t *video_info,
|
||||
int x1, int y1,
|
||||
|
@ -1073,6 +1073,7 @@ static int gfx_widgets_draw_indicator(video_frame_info_t *video_info,
|
||||
enum msg_hash_enums msg)
|
||||
{
|
||||
unsigned width;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
@ -1083,7 +1084,8 @@ static int gfx_widgets_draw_indicator(video_frame_info_t *video_info,
|
||||
unsigned height = simple_widget_height * 2;
|
||||
width = height;
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
top_right_x_advance - width, y,
|
||||
width, height,
|
||||
video_width, video_height,
|
||||
@ -1107,11 +1109,12 @@ static int gfx_widgets_draw_indicator(video_frame_info_t *video_info,
|
||||
|
||||
width = font_driver_get_message_width(font_regular, txt, (unsigned)strlen(txt), 1) + simple_widget_padding*2;
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
top_right_x_advance - width, y,
|
||||
width, height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
top_right_x_advance - width, y,
|
||||
width, height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
gfx_display_draw_text(font_regular,
|
||||
@ -1144,6 +1147,7 @@ static void gfx_widgets_draw_task_msg(menu_widget_msg_t *msg,
|
||||
bool draw_msg_new = false;
|
||||
unsigned task_percentage_offset = 0;
|
||||
char task_percentage[256] = {0};
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
@ -1184,12 +1188,13 @@ static void gfx_widgets_draw_task_msg(menu_widget_msg_t *msg,
|
||||
rect_height = msg_queue_height/2;
|
||||
|
||||
gfx_display_set_alpha(msg_queue_current_background, msg->alpha);
|
||||
gfx_display_draw_quad(video_info,
|
||||
rect_x, rect_y,
|
||||
rect_width, rect_height,
|
||||
video_width, video_height,
|
||||
msg_queue_current_background
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
rect_x, rect_y,
|
||||
rect_width, rect_height,
|
||||
video_width, video_height,
|
||||
msg_queue_current_background
|
||||
);
|
||||
|
||||
/* Progress bar */
|
||||
if (!msg->task_finished && msg->task_progress >= 0 && msg->task_progress <= 100)
|
||||
@ -1200,12 +1205,13 @@ static void gfx_widgets_draw_task_msg(menu_widget_msg_t *msg,
|
||||
msg_queue_current_bar = msg_queue_task_progress_2;
|
||||
|
||||
gfx_display_set_alpha(msg_queue_current_bar, 1.0f);
|
||||
gfx_display_draw_quad(video_info,
|
||||
msg_queue_task_rect_start_x, video_height - msg->offset_y,
|
||||
bar_width, rect_height,
|
||||
video_width, video_height,
|
||||
msg_queue_current_bar
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
msg_queue_task_rect_start_x, video_height - msg->offset_y,
|
||||
bar_width, rect_height,
|
||||
video_width, video_height,
|
||||
msg_queue_current_bar
|
||||
);
|
||||
}
|
||||
|
||||
/* Icon */
|
||||
@ -1289,6 +1295,7 @@ static void gfx_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_inf
|
||||
unsigned bar_width;
|
||||
unsigned text_color;
|
||||
uintptr_t icon = 0;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
@ -1331,12 +1338,13 @@ static void gfx_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_inf
|
||||
/* Background */
|
||||
bar_width = simple_widget_padding + msg->width;
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
msg_queue_rect_start_x, video_height - msg->offset_y,
|
||||
bar_width, msg_queue_height,
|
||||
video_width, video_height,
|
||||
msg_queue_background
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
msg_queue_rect_start_x, video_height - msg->offset_y,
|
||||
bar_width, msg_queue_height,
|
||||
video_width, video_height,
|
||||
msg_queue_background
|
||||
);
|
||||
|
||||
/* Text */
|
||||
text_color = COLOR_TEXT_ALPHA(0xFFFFFF00, (unsigned)(msg->alpha*255.0f));
|
||||
@ -1393,10 +1401,13 @@ static void gfx_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_inf
|
||||
|
||||
static void gfx_widgets_draw_backdrop(video_frame_info_t *video_info, float alpha)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop, alpha);
|
||||
gfx_display_draw_quad(video_info, 0, 0,
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height, 0, 0,
|
||||
video_width, video_height, video_width, video_height,
|
||||
gfx_widgets_backdrop);
|
||||
}
|
||||
@ -1463,6 +1474,7 @@ void gfx_widgets_frame(void *data)
|
||||
video_frame_info_t *video_info = (video_frame_info_t*)data;
|
||||
bool framecount_show = video_info->framecount_show;
|
||||
bool memory_show = video_info->memory_show;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool widgets_is_paused = video_info->widgets_is_paused;
|
||||
@ -1504,33 +1516,38 @@ void gfx_widgets_frame(void *data)
|
||||
0, 1, gfx_widgets_pure_white
|
||||
);
|
||||
/* top line */
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
video_width, divider_width_1px,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, 0,
|
||||
video_width, divider_width_1px,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
/* bottom line */
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_height - divider_width_1px,
|
||||
video_width, divider_width_1px,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, video_height - divider_width_1px,
|
||||
video_width, divider_width_1px,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
/* left line */
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
divider_width_1px, video_height,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0,
|
||||
divider_width_1px, video_height,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
/* right line */
|
||||
gfx_display_draw_quad(video_info,
|
||||
video_width - divider_width_1px, 0,
|
||||
divider_width_1px, video_height,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
video_width - divider_width_1px, 0,
|
||||
divider_width_1px, video_height,
|
||||
video_width, video_height,
|
||||
outline_color
|
||||
);
|
||||
|
||||
if (ai_service_overlay_state == 2)
|
||||
ai_service_overlay_state = 3;
|
||||
@ -1543,11 +1560,12 @@ void gfx_widgets_frame(void *data)
|
||||
unsigned text_color = COLOR_TEXT_ALPHA(0xffffffff, (unsigned)(libretro_message_alpha*255.0f));
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, libretro_message_alpha);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_height - generic_message_height,
|
||||
libretro_message_width, generic_message_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, video_height - generic_message_height,
|
||||
libretro_message_width, generic_message_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
|
||||
gfx_display_draw_text(font_regular, libretro_message,
|
||||
simple_widget_padding,
|
||||
@ -1563,11 +1581,12 @@ void gfx_widgets_frame(void *data)
|
||||
unsigned text_color = COLOR_TEXT_ALPHA(0xffffffff, (unsigned)(generic_message_alpha*255.0f));
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, generic_message_alpha);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, video_height - generic_message_height,
|
||||
video_width, generic_message_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, video_height - generic_message_height,
|
||||
video_width, generic_message_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
|
||||
gfx_display_draw_text(font_regular, generic_message,
|
||||
video_width/2,
|
||||
@ -1585,12 +1604,13 @@ void gfx_widgets_frame(void *data)
|
||||
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, screenshot_y,
|
||||
screenshot_width, screenshot_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, screenshot_y,
|
||||
screenshot_width, screenshot_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
gfx_display_set_alpha(gfx_widgets_pure_white, 1.0f);
|
||||
gfx_widgets_draw_icon(video_info,
|
||||
@ -1645,11 +1665,12 @@ void gfx_widgets_frame(void *data)
|
||||
if (!cheevo_popup_queue[cheevo_popup_queue_read_index].badge)
|
||||
{
|
||||
/* Backdrop */
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, (int)cheevo_y,
|
||||
cheevo_height, cheevo_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
0, (int)cheevo_y,
|
||||
cheevo_height, cheevo_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
|
||||
/* Icon */
|
||||
if (gfx_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT])
|
||||
@ -1681,11 +1702,12 @@ void gfx_widgets_frame(void *data)
|
||||
cheevo_height);
|
||||
|
||||
/* Backdrop */
|
||||
gfx_display_draw_quad(video_info,
|
||||
cheevo_height, (int)cheevo_y,
|
||||
cheevo_width, cheevo_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width, video_height,
|
||||
cheevo_height, (int)cheevo_y,
|
||||
cheevo_width, cheevo_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig);
|
||||
|
||||
/* Title */
|
||||
gfx_display_draw_text(font_regular,
|
||||
@ -1782,14 +1804,16 @@ void gfx_widgets_frame(void *data)
|
||||
/* Backdrop */
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, volume_alpha);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
volume_widget_width,
|
||||
volume_widget_height,
|
||||
video_width,
|
||||
video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0,
|
||||
volume_widget_width,
|
||||
volume_widget_height,
|
||||
video_width,
|
||||
video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
/* Icon */
|
||||
if (volume_icon)
|
||||
@ -1827,19 +1851,23 @@ void gfx_widgets_frame(void *data)
|
||||
gfx_display_set_alpha(bar_background, volume_text_alpha);
|
||||
gfx_display_set_alpha(bar_foreground, volume_text_alpha);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
bar_x + bar_percentage * bar_width, bar_y,
|
||||
bar_width - bar_percentage * bar_width, bar_height,
|
||||
video_width, video_height,
|
||||
bar_background
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
bar_x + bar_percentage * bar_width, bar_y,
|
||||
bar_width - bar_percentage * bar_width, bar_height,
|
||||
video_width, video_height,
|
||||
bar_background
|
||||
);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
bar_x, bar_y,
|
||||
bar_percentage * bar_width, bar_height,
|
||||
video_width, video_height,
|
||||
bar_foreground
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
bar_x, bar_y,
|
||||
bar_percentage * bar_width, bar_height,
|
||||
video_width, video_height,
|
||||
bar_foreground
|
||||
);
|
||||
|
||||
/* Text */
|
||||
snprintf(msg, sizeof(msg), (volume_db >= 0 ? "+%.1f dB" : "%.1f dB"),
|
||||
@ -1900,12 +1928,14 @@ void gfx_widgets_frame(void *data)
|
||||
|
||||
gfx_display_set_alpha(gfx_widgets_backdrop_orig, DEFAULT_BACKDROP);
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
top_right_x_advance - total_width, 0,
|
||||
total_width, simple_widget_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
top_right_x_advance - total_width, 0,
|
||||
total_width, simple_widget_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_backdrop_orig
|
||||
);
|
||||
|
||||
gfx_display_draw_text(font_regular,
|
||||
text,
|
||||
@ -1942,12 +1972,14 @@ void gfx_widgets_frame(void *data)
|
||||
if (screenshot_alpha > 0.0f)
|
||||
{
|
||||
gfx_display_set_alpha(gfx_widgets_pure_white, screenshot_alpha);
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0,
|
||||
video_width, video_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_pure_white
|
||||
);
|
||||
gfx_display_draw_quad(userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0,
|
||||
video_width, video_height,
|
||||
video_width, video_height,
|
||||
gfx_widgets_pure_white
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -1767,6 +1767,9 @@ static void materialui_draw_thumbnail(
|
||||
float bg_y;
|
||||
float bg_width;
|
||||
float bg_height;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Sanity check */
|
||||
if (scale_factor <= 0)
|
||||
@ -1796,7 +1799,9 @@ static void materialui_draw_thumbnail(
|
||||
mui->transition_alpha);
|
||||
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
bg_x,
|
||||
bg_y,
|
||||
(unsigned)bg_width,
|
||||
@ -1848,7 +1853,9 @@ static void materialui_draw_thumbnail(
|
||||
|
||||
/* > Draw background quad */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
(int)bg_x,
|
||||
(int)bg_y,
|
||||
(unsigned)(bg_width + 0.5f),
|
||||
@ -1893,6 +1900,7 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
|
||||
int y = 0;
|
||||
int longest_width = 0;
|
||||
size_t longest_len = 0;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
struct string_list *list = NULL;
|
||||
@ -1937,7 +1945,9 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
|
||||
mui->colors.surface_background, mui->transition_alpha);
|
||||
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x - longest_width / 2.0 - mui->margin * 2.0,
|
||||
y - mui->font_data.list.font_height / 2.0 - mui->margin * 2.0,
|
||||
longest_width + mui->margin * 4.0,
|
||||
@ -2982,6 +2992,9 @@ static void materialui_render_menu_entry_playlist_list(
|
||||
unsigned width, unsigned height,
|
||||
int x_offset)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
const char *entry_label = NULL;
|
||||
const char *entry_sublabel = NULL;
|
||||
int entry_y = header_height - mui->scroll_y + node->y;
|
||||
@ -3169,7 +3182,9 @@ static void materialui_render_menu_entry_playlist_list(
|
||||
{
|
||||
if (usable_width > 0)
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
(float)(x_offset + entry_margin),
|
||||
entry_y + (float)node->entry_height,
|
||||
(unsigned)usable_width,
|
||||
@ -3194,6 +3209,9 @@ static void materialui_render_menu_entry_playlist_dual_icon(
|
||||
unsigned width, unsigned height,
|
||||
int x_offset)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
const char *entry_label = NULL;
|
||||
int usable_width =
|
||||
(int)width - (int)(mui->margin * 2) -
|
||||
@ -3308,7 +3326,9 @@ static void materialui_render_menu_entry_playlist_dual_icon(
|
||||
/* Draw divider */
|
||||
if (usable_width > 0)
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
(float)(x_offset + (int)mui->margin + (int)mui->landscape_entry_margin),
|
||||
thumbnail_y + (float)mui->thumbnail_height_max +
|
||||
((float)mui->dip_base_unit_size / 10.0f) +
|
||||
@ -3325,13 +3345,18 @@ static void materialui_render_scrollbar(
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
/* Do nothing if scrollbar is disabled */
|
||||
if (!mui->scrollbar.active)
|
||||
return;
|
||||
|
||||
/* Draw scrollbar */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
mui->scrollbar.x,
|
||||
mui->scrollbar.y,
|
||||
mui->scrollbar.width,
|
||||
@ -3540,6 +3565,10 @@ static void materialui_render_landscape_border(
|
||||
materialui_handle_t *mui, video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height, unsigned header_height, int x_offset)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
if (mui->landscape_entry_margin > mui->margin)
|
||||
{
|
||||
unsigned border_width = mui->landscape_entry_margin - mui->margin;
|
||||
@ -3552,7 +3581,9 @@ static void materialui_render_landscape_border(
|
||||
|
||||
/* Draw left border */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
left_x,
|
||||
y,
|
||||
border_width,
|
||||
@ -3563,7 +3594,9 @@ static void materialui_render_landscape_border(
|
||||
|
||||
/* Draw right border */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
right_x,
|
||||
y,
|
||||
border_width,
|
||||
@ -3579,6 +3612,10 @@ static void materialui_render_selection_highlight(
|
||||
unsigned width, unsigned height, unsigned header_height, int x_offset,
|
||||
size_t selection, float *color)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Only draw highlight if selection is onscreen */
|
||||
if (materialui_entry_onscreen(mui, selection))
|
||||
{
|
||||
@ -3617,7 +3654,9 @@ static void materialui_render_selection_highlight(
|
||||
|
||||
/* Draw highlight quad */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
highlight_x,
|
||||
highlight_y,
|
||||
(unsigned)highlight_width,
|
||||
@ -3718,6 +3757,9 @@ static void materialui_render_header(
|
||||
bool menu_timedate_enable = settings->bools.menu_timedate_enable;
|
||||
unsigned menu_timedate_style = settings->uints.menu_timedate_style;
|
||||
bool menu_core_enable = settings->bools.menu_core_enable;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
menu_title_buf[0] = '\0';
|
||||
|
||||
@ -3727,7 +3769,9 @@ static void materialui_render_header(
|
||||
|
||||
/* > Shadow */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
mui->sys_bar_height + mui->title_bar_height,
|
||||
width,
|
||||
@ -3738,7 +3782,9 @@ static void materialui_render_header(
|
||||
|
||||
/* > Title bar background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
@ -3749,7 +3795,9 @@ static void materialui_render_header(
|
||||
|
||||
/* > System bar background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
@ -4097,6 +4145,7 @@ static void materialui_render_nav_bar_bottom(
|
||||
materialui_handle_t *mui, video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned nav_bar_width = width;
|
||||
unsigned nav_bar_height = mui->nav_bar.width;
|
||||
int nav_bar_x = 0;
|
||||
@ -4107,13 +4156,17 @@ static void materialui_render_nav_bar_bottom(
|
||||
unsigned selection_marker_width = tab_width_int;
|
||||
unsigned selection_marker_height = mui->nav_bar.selection_marker_width;
|
||||
int selection_marker_y = (int)height - (int)mui->nav_bar.selection_marker_width;
|
||||
unsigned i;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Draw navigation bar background */
|
||||
|
||||
/* > Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
nav_bar_width,
|
||||
@ -4124,7 +4177,9 @@ static void materialui_render_nav_bar_bottom(
|
||||
|
||||
/* > Divider */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
nav_bar_width,
|
||||
@ -4182,7 +4237,9 @@ static void materialui_render_nav_bar_bottom(
|
||||
|
||||
/* Draw selection marker */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
(int)((i + 1) * tab_width_int),
|
||||
selection_marker_y,
|
||||
selection_marker_width,
|
||||
@ -4197,6 +4254,7 @@ static void materialui_render_nav_bar_right(
|
||||
materialui_handle_t *mui, video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned nav_bar_width = mui->nav_bar.width;
|
||||
unsigned nav_bar_height = height;
|
||||
int nav_bar_x = (int)width - (int)mui->nav_bar.width;
|
||||
@ -4207,13 +4265,17 @@ static void materialui_render_nav_bar_right(
|
||||
unsigned selection_marker_width = mui->nav_bar.selection_marker_width;
|
||||
unsigned selection_marker_height = tab_height_int;
|
||||
int selection_marker_x = (int)width - (int)mui->nav_bar.selection_marker_width;
|
||||
unsigned i;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Draw navigation bar background */
|
||||
|
||||
/* > Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
nav_bar_width,
|
||||
@ -4224,7 +4286,9 @@ static void materialui_render_nav_bar_right(
|
||||
|
||||
/* > Divider */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
nav_bar_x,
|
||||
nav_bar_y,
|
||||
mui->nav_bar.divider_width,
|
||||
@ -4282,7 +4346,9 @@ static void materialui_render_nav_bar_right(
|
||||
|
||||
/* Draw selection marker */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
selection_marker_x,
|
||||
(int)((i + 1) * tab_height_int),
|
||||
selection_marker_width,
|
||||
@ -4478,6 +4544,10 @@ static void materialui_render_fullscreen_thumbnails(
|
||||
unsigned width, unsigned height, unsigned header_height,
|
||||
size_t selection)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Check whether fullscreen thumbnails are visible */
|
||||
if (mui->fullscreen_thumbnail_alpha > 0.0f)
|
||||
{
|
||||
@ -4677,7 +4747,9 @@ static void materialui_render_fullscreen_thumbnails(
|
||||
|
||||
/* Darken background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
header_height,
|
||||
(unsigned)view_width,
|
||||
@ -4692,7 +4764,9 @@ static void materialui_render_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
primary_thumbnail_x - (int)(mui->margin >> 1) +
|
||||
((thumbnail_box_width - (int)primary_thumbnail_draw_width) >> 1),
|
||||
primary_thumbnail_y - (int)(mui->margin >> 1) +
|
||||
@ -4722,7 +4796,9 @@ static void materialui_render_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
secondary_thumbnail_x - (int)(mui->margin >> 1) +
|
||||
((thumbnail_box_width - (int)secondary_thumbnail_draw_width) >> 1),
|
||||
secondary_thumbnail_y - (int)(mui->margin >> 1) +
|
||||
@ -4876,8 +4952,11 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
unsigned
|
||||
materialui_color_theme = video_info->materialui_color_theme;
|
||||
unsigned header_height = gfx_display_get_header_height();
|
||||
@ -5001,7 +5080,10 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Darken screen */
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.screen_fade, mui->colors.screen_fade_opacity);
|
||||
gfx_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0, width, height, width, height, mui->colors.screen_fade);
|
||||
|
||||
/* Draw message box */
|
||||
@ -5029,7 +5111,10 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Darken screen */
|
||||
gfx_display_set_alpha(
|
||||
mui->colors.screen_fade, mui->colors.screen_fade_opacity);
|
||||
gfx_display_draw_quad(video_info,
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0, width, height, width, height, mui->colors.screen_fade);
|
||||
|
||||
/* Draw message box */
|
||||
|
@ -1491,6 +1491,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
unsigned seperator_margin = 30 * scale_factor;
|
||||
enum gfx_animation_ticker_type
|
||||
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool battery_level_enable = video_info->battery_level_enable;
|
||||
@ -1514,7 +1515,17 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
}
|
||||
|
||||
/* Separator */
|
||||
gfx_display_draw_quad(video_info, seperator_margin, ozone->dimensions.header_height, video_width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->header_footer_separator);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
seperator_margin,
|
||||
ozone->dimensions.header_height,
|
||||
video_width - seperator_margin * 2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator);
|
||||
|
||||
/* Title */
|
||||
if (use_smooth_ticker)
|
||||
@ -1638,11 +1649,22 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
unsigned seperator_margin = 30 * scale_factor;
|
||||
bool menu_core_enable = settings->bools.menu_core_enable;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
/* Separator */
|
||||
gfx_display_draw_quad(video_info, seperator_margin, video_height - ozone->dimensions.footer_height, video_width - seperator_margin * 2, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->header_footer_separator);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
seperator_margin,
|
||||
video_height - ozone->dimensions.footer_height,
|
||||
video_width - seperator_margin * 2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->header_footer_separator);
|
||||
|
||||
/* Core title or Switch icon */
|
||||
if (menu_core_enable)
|
||||
@ -2017,6 +2039,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
bool draw_osk = menu_input_dialog_get_display_kb();
|
||||
static bool draw_osk_old = false;
|
||||
float *background_color = NULL;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
float menu_framebuffer_opacity = video_info->menu_framebuffer_opacity;
|
||||
@ -2104,11 +2127,14 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
else
|
||||
background_color = ozone->theme->background;
|
||||
|
||||
gfx_display_draw_quad(video_info,
|
||||
0, 0, video_width, video_height,
|
||||
video_width, video_height,
|
||||
background_color
|
||||
);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, 0, video_width, video_height,
|
||||
video_width, video_height,
|
||||
background_color
|
||||
);
|
||||
|
||||
/* Header, footer */
|
||||
ozone_draw_header(ozone, video_info);
|
||||
|
@ -167,6 +167,7 @@ static void ozone_draw_cursor_fallback(ozone_handle_t *ozone,
|
||||
unsigned width, unsigned height,
|
||||
size_t y, float alpha)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
@ -174,21 +175,71 @@ static void ozone_draw_cursor_fallback(ozone_handle_t *ozone,
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.selection, alpha);
|
||||
|
||||
/* Fill */
|
||||
gfx_display_draw_quad(video_info, x_offset, (int)y, width, height - ozone->dimensions.spacer_5px, video_width, video_height, ozone->theme_dynamic.selection);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_offset,
|
||||
(int)y,
|
||||
width,
|
||||
height - ozone->dimensions.spacer_5px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.selection);
|
||||
|
||||
/* Borders (can't do one single quad because of alpha) */
|
||||
|
||||
/* Top */
|
||||
gfx_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y - ozone->dimensions.spacer_3px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_width, video_height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_offset - ozone->dimensions.spacer_3px,
|
||||
(int)(y - ozone->dimensions.spacer_3px),
|
||||
width + ozone->dimensions.spacer_3px * 2,
|
||||
ozone->dimensions.spacer_3px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Bottom */
|
||||
gfx_display_draw_quad(video_info, x_offset - ozone->dimensions.spacer_3px, (int)(y + height - ozone->dimensions.spacer_5px), width + ozone->dimensions.spacer_3px * 2, ozone->dimensions.spacer_3px, video_width, video_height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_offset - ozone->dimensions.spacer_3px,
|
||||
(int)(y + height - ozone->dimensions.spacer_5px),
|
||||
width + ozone->dimensions.spacer_3px * 2,
|
||||
ozone->dimensions.spacer_3px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Left */
|
||||
gfx_display_draw_quad(video_info, (int)(x_offset - ozone->dimensions.spacer_3px), (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_width, video_height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
(int)(x_offset - ozone->dimensions.spacer_3px),
|
||||
(int)y,
|
||||
ozone->dimensions.spacer_3px,
|
||||
height - ozone->dimensions.spacer_5px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.selection_border);
|
||||
|
||||
/* Right */
|
||||
gfx_display_draw_quad(video_info, x_offset + width, (int)y, ozone->dimensions.spacer_3px, height - ozone->dimensions.spacer_5px, video_width, video_height, ozone->theme_dynamic.selection_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_offset + width,
|
||||
(int)y,
|
||||
ozone->dimensions.spacer_3px,
|
||||
height - ozone->dimensions.spacer_5px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.selection_border);
|
||||
}
|
||||
|
||||
void ozone_draw_cursor(ozone_handle_t *ozone,
|
||||
@ -252,11 +303,22 @@ 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 */
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
gfx_display_set_alpha(ozone_backdrop, alpha);
|
||||
gfx_display_draw_quad(video_info, 0, 0, video_width, video_height, video_width, video_height, ozone_backdrop);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
0,
|
||||
video_width,
|
||||
video_height,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone_backdrop);
|
||||
}
|
||||
|
||||
void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
@ -267,7 +329,8 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
const char *text;
|
||||
char message[2048];
|
||||
unsigned text_color;
|
||||
struct string_list *list;
|
||||
struct string_list *list= NULL;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
|
||||
@ -289,20 +352,70 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
|
||||
/* Border */
|
||||
/* Top */
|
||||
gfx_display_draw_quad(video_info, margin, margin, video_width - margin*2, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
margin,
|
||||
margin,
|
||||
video_width - margin*2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->entries_border);
|
||||
|
||||
/* Bottom */
|
||||
gfx_display_draw_quad(video_info, margin, bottom_end - margin, video_width - margin*2, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
margin,
|
||||
bottom_end - margin,
|
||||
video_width - margin*2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->entries_border);
|
||||
|
||||
/* Left */
|
||||
gfx_display_draw_quad(video_info, margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_width, video_height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
margin,
|
||||
margin,
|
||||
ozone->dimensions.spacer_1px,
|
||||
bottom_end - margin*2,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->entries_border);
|
||||
|
||||
/* Right */
|
||||
gfx_display_draw_quad(video_info, video_width - margin, margin, ozone->dimensions.spacer_1px, bottom_end - margin*2, video_width, video_height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
video_width - margin,
|
||||
margin,
|
||||
ozone->dimensions.spacer_1px,
|
||||
bottom_end - margin*2,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->entries_border);
|
||||
|
||||
/* Backdrop */
|
||||
/* TODO: Remove the backdrop if blur shader is available */
|
||||
gfx_display_draw_quad(video_info, margin + ozone->dimensions.spacer_1px, margin + ozone->dimensions.spacer_1px, video_width - margin*2 - ozone->dimensions.spacer_2px, bottom_end - margin*2 - ozone->dimensions.spacer_2px, video_width, video_height, ozone_osk_backdrop);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
margin + ozone->dimensions.spacer_1px,
|
||||
margin + ozone->dimensions.spacer_1px,
|
||||
video_width - margin*2 - ozone->dimensions.spacer_2px,
|
||||
bottom_end - margin*2 - ozone->dimensions.spacer_2px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone_osk_backdrop);
|
||||
|
||||
/* Placeholder & text*/
|
||||
if (!draw_placeholder)
|
||||
@ -332,7 +445,17 @@ void ozone_draw_osk(ozone_handle_t *ozone,
|
||||
if (ozone->osk_cursor)
|
||||
{
|
||||
unsigned cursor_x = draw_placeholder ? 0 : font_driver_get_message_width(ozone->fonts.entries_label, msg, (unsigned)strlen(msg), 1);
|
||||
gfx_display_draw_quad(video_info, margin + padding*2 + cursor_x, margin + padding + y_offset + ozone->dimensions.spacer_3px, ozone->dimensions.spacer_1px, 25 * scale_factor, video_width, video_height, ozone_pure_white);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
margin + padding*2 + cursor_x,
|
||||
margin + padding + y_offset + ozone->dimensions.spacer_3px,
|
||||
ozone->dimensions.spacer_1px,
|
||||
25 * scale_factor,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone_pure_white);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -452,8 +575,11 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
* thumbnail when viewed fullscreen */
|
||||
gfx_thumbnail_t *right_thumbnail = &ozone->thumbnails.left;
|
||||
gfx_thumbnail_t *left_thumbnail = &ozone->thumbnails.right;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
int view_width = (int)width;
|
||||
int view_height = (int)height - ozone->dimensions.header_height - ozone->dimensions.footer_height - ozone->dimensions.spacer_1px;
|
||||
int thumbnail_margin = ozone->dimensions.fullscreen_thumbnail_padding;
|
||||
@ -616,7 +742,9 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
|
||||
/* Darken background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px,
|
||||
width,
|
||||
@ -627,7 +755,9 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
|
||||
/* Draw full-width separators */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
ozone->dimensions.header_height,
|
||||
width,
|
||||
@ -637,7 +767,9 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
separator_color);
|
||||
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
height - ozone->dimensions.footer_height,
|
||||
width,
|
||||
@ -653,7 +785,9 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
right_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
@ -683,7 +817,9 @@ void ozone_draw_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
left_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
|
@ -360,16 +360,18 @@ void ozone_entries_update_thumbnail_bar(ozone_handle_t *ozone, bool is_playlist,
|
||||
}
|
||||
}
|
||||
|
||||
void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
|
||||
unsigned selection, unsigned selection_old,
|
||||
file_list_t *selection_buf, float alpha, float scroll_y,
|
||||
bool is_playlist)
|
||||
void ozone_draw_entries(ozone_handle_t *ozone,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned selection, unsigned selection_old,
|
||||
file_list_t *selection_buf, float alpha, float scroll_y,
|
||||
bool is_playlist)
|
||||
{
|
||||
uint32_t alpha_uint32;
|
||||
size_t i, y, entries_end;
|
||||
float sidebar_offset, bottom_boundary, invert, alpha_anim;
|
||||
unsigned video_info_height, video_info_width, entry_width, button_height;
|
||||
settings_t *settings = config_get_ptr();
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool menu_show_sublabels= settings->bools.menu_show_sublabels;
|
||||
@ -446,10 +448,28 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
|
||||
gfx_display_set_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
|
||||
|
||||
/* Borders */
|
||||
gfx_display_draw_quad(video_info, border_start_x,
|
||||
border_start_y, entry_width, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme_dynamic.entries_border);
|
||||
gfx_display_draw_quad(video_info, border_start_x,
|
||||
border_start_y + button_height, entry_width, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme_dynamic.entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
border_start_x,
|
||||
border_start_y,
|
||||
entry_width,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
border_start_x,
|
||||
border_start_y + button_height,
|
||||
entry_width,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.entries_border);
|
||||
|
||||
border_iterate:
|
||||
if (node)
|
||||
@ -749,6 +769,7 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
int left_thumbnail_y_position = 0;
|
||||
bool show_right_thumbnail = false;
|
||||
bool show_left_thumbnail = false;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool libretro_running = video_info->libretro_running;
|
||||
@ -761,9 +782,39 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
/* Background */
|
||||
if (!libretro_running || (menu_framebuffer_opacity >= 1.0f))
|
||||
{
|
||||
gfx_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height, video_width, video_height, ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(video_info, x_position, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->animations.thumbnail_bar_position, sidebar_height, video_width, video_height, ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(video_info, x_position, video_height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->animations.thumbnail_bar_position, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->sidebar_bottom_gradient);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_position,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position,
|
||||
ozone->dimensions.sidebar_gradient_height,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_position,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height,
|
||||
(unsigned)ozone->animations.thumbnail_bar_position,
|
||||
sidebar_height,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_position,
|
||||
video_height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px,
|
||||
(unsigned) ozone->animations.thumbnail_bar_position,
|
||||
ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_bottom_gradient);
|
||||
}
|
||||
|
||||
/* Thumbnails */
|
||||
@ -895,11 +946,17 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
/* Content metadata */
|
||||
|
||||
/* Separator */
|
||||
gfx_display_draw_quad(video_info,
|
||||
x_position + separator_padding, y,
|
||||
sidebar_width - separator_padding*2, ozone->dimensions.spacer_1px,
|
||||
video_width, video_height,
|
||||
ozone->theme_dynamic.entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
x_position + separator_padding,
|
||||
y,
|
||||
sidebar_width - separator_padding*2,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme_dynamic.entries_border);
|
||||
|
||||
y += 18;
|
||||
|
||||
|
@ -120,6 +120,7 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
||||
float scale_factor = ozone->last_scale_factor;
|
||||
enum gfx_animation_ticker_type
|
||||
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool libretro_running = video_info->libretro_running;
|
||||
@ -162,9 +163,39 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
||||
|
||||
if (!libretro_running || (menu_framebuffer_opacity >= 1.0f))
|
||||
{
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height, video_width, video_height, ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height, (unsigned) ozone->dimensions.sidebar_width, sidebar_height, video_width, video_height, ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset, video_height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px, (unsigned) ozone->dimensions.sidebar_width, ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->sidebar_bottom_gradient);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->sidebar_offset,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px,
|
||||
(unsigned)ozone->dimensions.sidebar_width,
|
||||
ozone->dimensions.sidebar_gradient_height,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_top_gradient);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->sidebar_offset,
|
||||
ozone->dimensions.header_height + ozone->dimensions.spacer_1px + ozone->dimensions.sidebar_gradient_height,
|
||||
(unsigned)ozone->dimensions.sidebar_width,
|
||||
sidebar_height,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_background);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->sidebar_offset,
|
||||
video_height - ozone->dimensions.footer_height - ozone->dimensions.sidebar_gradient_height - ozone->dimensions.spacer_1px,
|
||||
(unsigned)ozone->dimensions.sidebar_width,
|
||||
ozone->dimensions.sidebar_gradient_height + ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->sidebar_bottom_gradient);
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
@ -234,7 +265,17 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
|
||||
/* Console tabs */
|
||||
if (horizontal_list_size > 0)
|
||||
{
|
||||
gfx_display_draw_quad(video_info, ozone->sidebar_offset + ozone->dimensions.sidebar_padding_horizontal, y + ozone->animations.scroll_y_sidebar, entry_width, ozone->dimensions.spacer_1px, video_width, video_height, ozone->theme->entries_border);
|
||||
gfx_display_draw_quad(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->sidebar_offset + ozone->dimensions.sidebar_padding_horizontal,
|
||||
y + ozone->animations.scroll_y_sidebar,
|
||||
entry_width,
|
||||
ozone->dimensions.spacer_1px,
|
||||
video_width,
|
||||
video_height,
|
||||
ozone->theme->entries_border);
|
||||
|
||||
y += ozone->dimensions.sidebar_entry_padding_vertical + ozone->dimensions.spacer_1px;
|
||||
|
||||
|
@ -688,6 +688,7 @@ static void stripes_render_keyboard(
|
||||
{
|
||||
unsigned i;
|
||||
int ptr_width, ptr_height;
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
float dark[16] = {
|
||||
@ -705,7 +706,9 @@ static void stripes_render_keyboard(
|
||||
};
|
||||
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0, height/2.0, width, height/2.0,
|
||||
width, height,
|
||||
&dark[0]);
|
||||
|
@ -3898,6 +3898,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
xmb_handle_t *xmb, video_frame_info_t *video_info,
|
||||
settings_t *settings, size_t selection)
|
||||
{
|
||||
void *userdata = video_info->userdata;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
bool xmb_shadows_enable = video_info->xmb_shadows_enable;
|
||||
@ -4118,7 +4119,9 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
|
||||
/* Darken background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
0,
|
||||
(unsigned)view_width,
|
||||
@ -4132,7 +4135,9 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
0,
|
||||
0,
|
||||
(unsigned)view_width,
|
||||
@ -4222,7 +4227,9 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
right_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
@ -4252,7 +4259,9 @@ static void xmb_draw_fullscreen_thumbnails(
|
||||
{
|
||||
/* Background */
|
||||
gfx_display_draw_quad(
|
||||
video_info,
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
left_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
|
Loading…
Reference in New Issue
Block a user