mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 17:04:34 +00:00
Add MENU_ENTRIES_CTL_SHOW_BACK
This commit is contained in:
parent
352836a595
commit
fde4826754
@ -827,7 +827,7 @@ static void mui_frame(void *data)
|
||||
|
||||
title_margin = mui->margin;
|
||||
|
||||
if (menu_entries_show_back())
|
||||
if (menu_entries_ctl(MENU_ENTRIES_CTL_SHOW_BACK, NULL))
|
||||
{
|
||||
title_margin = mui->icon_size;
|
||||
mui_draw_icon(mui, mui->textures.list[MUI_TEXTURE_BACK].id,
|
||||
|
@ -519,7 +519,7 @@ static void rgui_render(void *data)
|
||||
hover_color = HOVER_COLOR(settings);
|
||||
normal_color = NORMAL_COLOR(settings);
|
||||
|
||||
if (menu_entries_show_back())
|
||||
if (menu_entries_ctl(MENU_ENTRIES_CTL_SHOW_BACK, NULL))
|
||||
blit_line(fb_data, fb_pitch,
|
||||
RGUI_TERM_START_X(fb_width),
|
||||
RGUI_TERM_START_X(fb_width),
|
||||
|
@ -447,12 +447,6 @@ int menu_entries_get_title(char *s, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns true if a Back button should be shown (i.e. we are at least
|
||||
* one level deep in the menu hierarchy). */
|
||||
bool menu_entries_show_back(void)
|
||||
{
|
||||
return (menu_entries_get_stack_size(0) > 1);
|
||||
}
|
||||
|
||||
/* Sets 's' to the name of the current core
|
||||
* (shown at the top of the UI). */
|
||||
@ -729,6 +723,11 @@ bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
/* Returns true if a Back button should be shown
|
||||
* (i.e. we are at least
|
||||
* one level deep in the menu hierarchy). */
|
||||
case MENU_ENTRIES_CTL_SHOW_BACK:
|
||||
return (menu_entries_get_stack_size(0) > 1);
|
||||
case MENU_ENTRIES_CTL_NONE:
|
||||
default:
|
||||
break;
|
||||
|
@ -103,7 +103,8 @@ typedef struct menu_file_list_cbs
|
||||
|
||||
enum menu_entries_ctl_state
|
||||
{
|
||||
MENU_ENTRIES_CTL_NONE = 0
|
||||
MENU_ENTRIES_CTL_NONE = 0,
|
||||
MENU_ENTRIES_CTL_SHOW_BACK
|
||||
};
|
||||
|
||||
typedef struct menu_list menu_list_t;
|
||||
@ -118,8 +119,6 @@ void menu_entries_get(size_t i, menu_entry_t *entry);
|
||||
|
||||
int menu_entries_get_title(char *title, size_t title_len);
|
||||
|
||||
bool menu_entries_show_back(void);
|
||||
|
||||
int menu_entries_get_core_title(char *title_msg, size_t title_msg_len);
|
||||
|
||||
rarch_setting_t *menu_setting_get_ptr(void);
|
||||
|
@ -672,7 +672,7 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
[self.sections addObject:everything];
|
||||
|
||||
weakSelf = self;
|
||||
if (menu_entries_show_back())
|
||||
if (menu_entries_ctl(MENU_ENTRIES_CTL_SHOW_BACK, NULL))
|
||||
[self set_leftbutton:BOXSTRING("Back")
|
||||
target:weakSelf
|
||||
action:@selector(menuBack)];
|
||||
|
Loading…
x
Reference in New Issue
Block a user