mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(Ozone) Button legend now responds to 'Menu Swap OK/Cancel' setting
This commit is contained in:
parent
622bef1f7a
commit
75d36ebc1f
@ -2748,6 +2748,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
||||
video_info->scale_integer = settings->bools.video_scale_integer;
|
||||
video_info->aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
||||
video_info->post_filter_record = settings->bools.video_post_filter_record;
|
||||
video_info->input_menu_swap_ok_cancel_buttons = settings->bools.input_menu_swap_ok_cancel_buttons;
|
||||
video_info->max_swapchain_images = settings->uints.video_max_swapchain_images;
|
||||
video_info->windowed_fullscreen = settings->bools.video_windowed_fullscreen;
|
||||
video_info->fullscreen = settings->bools.video_fullscreen || retroarch_is_forced_fullscreen();
|
||||
|
@ -404,6 +404,7 @@ typedef struct video_info
|
||||
|
||||
typedef struct video_frame_info
|
||||
{
|
||||
bool input_menu_swap_ok_cancel_buttons;
|
||||
bool input_driver_nonblock_state;
|
||||
bool shared_context;
|
||||
bool black_frame_insertion;
|
||||
|
@ -1992,13 +1992,48 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
ozone_draw_icon(video_info, 69, 30, ozone->theme_textures[OZONE_THEME_TEXTURE_SWITCH], 59, video_info->height - 52, video_info->width,video_info->height, 0, 1, NULL);
|
||||
|
||||
/* Buttons */
|
||||
menu_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 251, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 133, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
menu_display_blend_end(video_info);
|
||||
|
||||
ozone_draw_text(video_info, ozone, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK), video_info->width - 215, video_info->height - 49 + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba);
|
||||
ozone_draw_text(video_info, ozone, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK), video_info->width - 96, video_info->height - 49 + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba);
|
||||
{
|
||||
unsigned back_width = 215;
|
||||
unsigned back_height = 49;
|
||||
unsigned ok_width = 96;
|
||||
unsigned ok_height = 49;
|
||||
bool do_swap = video_info->input_menu_swap_ok_cancel_buttons;
|
||||
|
||||
if (do_swap)
|
||||
{
|
||||
back_width = 96;
|
||||
back_height = 49;
|
||||
ok_width = 215;
|
||||
ok_height = 49;
|
||||
}
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
|
||||
if (do_swap)
|
||||
{
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 133, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 251, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 251, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
ozone_draw_icon(video_info, 25, 25, ozone->theme_textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 133, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL);
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
|
||||
ozone_draw_text(video_info, ozone,
|
||||
do_swap ?
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK),
|
||||
video_info->width - back_width, video_info->height - back_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba);
|
||||
ozone_draw_text(video_info, ozone,
|
||||
do_swap ?
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK),
|
||||
video_info->width - ok_width, video_info->height - ok_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba);
|
||||
}
|
||||
|
||||
menu_display_blend_end(video_info);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user