mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-21 00:05:30 +00:00
Start creating Menu Help list
This commit is contained in:
parent
d725ff9738
commit
ac9d54032f
@ -46,6 +46,11 @@ static int deferred_push_rdb_collection(menu_displaylist_info_t *info)
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_PLAYLIST_COLLECTION);
|
||||
}
|
||||
|
||||
static int deferred_push_help(menu_displaylist_info_t *info)
|
||||
{
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_HELP_SCREEN_LIST);
|
||||
}
|
||||
|
||||
static int deferred_push_rdb_entry_detail(menu_displaylist_info_t *info)
|
||||
{
|
||||
int ret;
|
||||
@ -726,6 +731,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(menu_file_list_cbs_t *
|
||||
case MENU_LABEL_MANAGEMENT:
|
||||
cbs->action_deferred_push = deferred_push_management_options;
|
||||
break;
|
||||
case MENU_LABEL_HELP_LIST:
|
||||
cbs->action_deferred_push = deferred_push_help;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST:
|
||||
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
||||
break;
|
||||
|
@ -102,8 +102,6 @@ static int action_iterate_help(char *s, size_t len, const char *label)
|
||||
}
|
||||
|
||||
snprintf(s, len,
|
||||
"%s:\n"
|
||||
" \n"
|
||||
"[%s]: "
|
||||
"%-20s\n"
|
||||
"[%s]: "
|
||||
@ -129,7 +127,6 @@ static int action_iterate_help(char *s, size_t len, const char *label)
|
||||
"See Path Settings to set directories \n"
|
||||
"for faster access to files.\n"
|
||||
" \n",
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_BASIC_MENU_CONTROLS),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_UP), desc[0],
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_DOWN), desc[1],
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_CONFIRM), desc[2],
|
||||
@ -395,6 +392,7 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_HELP:
|
||||
case MENU_LABEL_HELP_CONTROLS:
|
||||
return ITERATE_TYPE_HELP;
|
||||
case MENU_LABEL_INFO_SCREEN:
|
||||
return ITERATE_TYPE_INFO;
|
||||
|
@ -1842,9 +1842,30 @@ static int action_ok_help(const char *path,
|
||||
menu_hash_to_str(MENU_LABEL_HELP),
|
||||
sizeof(info.label));
|
||||
menu->push_help_screen = true;
|
||||
menu->help_screen_type = MENU_HELP_WELCOME;
|
||||
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_HELP);
|
||||
|
||||
}
|
||||
|
||||
static int action_ok_help_controls(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
menu_displaylist_info_t info = {0};
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
info.list = menu_list->menu_stack;
|
||||
strlcpy(info.label,
|
||||
menu_hash_to_str(MENU_LABEL_HELP_CONTROLS),
|
||||
sizeof(info.label));
|
||||
menu->push_help_screen = true;
|
||||
menu->help_screen_type = MENU_HELP_CONTROLS;
|
||||
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_HELP);
|
||||
|
||||
}
|
||||
|
||||
static int action_ok_video_resolution(const char *path,
|
||||
@ -1982,6 +2003,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_HELP:
|
||||
cbs->action_ok = action_ok_help;
|
||||
break;
|
||||
case MENU_LABEL_HELP_CONTROLS:
|
||||
cbs->action_ok = action_ok_help_controls;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
cbs->action_ok = action_ok_shader_pass;
|
||||
break;
|
||||
@ -2025,6 +2049,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_ONLINE_UPDATER:
|
||||
case MENU_LABEL_LOAD_CONTENT_LIST:
|
||||
case MENU_LABEL_ADD_CONTENT_LIST:
|
||||
case MENU_LABEL_HELP_LIST:
|
||||
case MENU_LABEL_INFORMATION_LIST:
|
||||
case MENU_LABEL_CONTENT_SETTINGS:
|
||||
cbs->action_ok = action_ok_push_default;
|
||||
|
@ -69,6 +69,13 @@ static int action_get_title_help(const char *path, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_get_title_help_list(const char *path, const char *label,
|
||||
unsigned menu_type, char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, "HELP", len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_get_title_overlay(const char *path, const char *label,
|
||||
unsigned menu_type, char *s, size_t len)
|
||||
{
|
||||
@ -682,6 +689,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_HELP:
|
||||
cbs->action_get_title = action_get_title_help;
|
||||
break;
|
||||
case MENU_LABEL_HELP_LIST:
|
||||
cbs->action_get_title = action_get_title_help_list;
|
||||
break;
|
||||
case MENU_LABEL_INPUT_OVERLAY:
|
||||
cbs->action_get_title = action_get_title_overlay;
|
||||
break;
|
||||
|
@ -26,6 +26,10 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_HELP_LIST:
|
||||
return "help_list";
|
||||
case MENU_LABEL_HELP_CONTROLS:
|
||||
return "help_controls";
|
||||
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE:
|
||||
return "deferred_archive_open_detect_core";
|
||||
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN:
|
||||
@ -636,6 +640,10 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_VALUE_HELP_LIST:
|
||||
return "Help";
|
||||
case MENU_LABEL_VALUE_HELP_CONTROLS:
|
||||
return "Basic Menu Controls";
|
||||
case MENU_LABEL_VALUE_BASIC_MENU_CONTROLS:
|
||||
return "Basic menu controls";
|
||||
case MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_UP:
|
||||
@ -1119,7 +1127,7 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
case MENU_LABEL_VALUE_QUIT_RETROARCH:
|
||||
return "Quit RetroArch";
|
||||
case MENU_LABEL_VALUE_HELP:
|
||||
return "Help";
|
||||
return "help";
|
||||
case MENU_LABEL_VALUE_SAVE_NEW_CONFIG:
|
||||
return "Save New Config";
|
||||
case MENU_LABEL_VALUE_RESTART_CONTENT:
|
||||
|
@ -2176,6 +2176,15 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
menu_navigation_clear(nav, true);
|
||||
menu_entries_set_refresh();
|
||||
break;
|
||||
case DISPLAYLIST_HELP_SCREEN_LIST:
|
||||
menu_list_clear(info->list);
|
||||
menu_list_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_HELP_CONTROLS),
|
||||
menu_hash_to_str(MENU_LABEL_HELP_CONTROLS),
|
||||
0, 0, 0);
|
||||
need_refresh = true;
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_HELP:
|
||||
menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0);
|
||||
menu->push_help_screen = false;
|
||||
|
@ -32,6 +32,7 @@ enum
|
||||
DISPLAYLIST_NONE = 0,
|
||||
DISPLAYLIST_INFO,
|
||||
DISPLAYLIST_HELP,
|
||||
DISPLAYLIST_HELP_SCREEN_LIST,
|
||||
DISPLAYLIST_MAIN_MENU,
|
||||
DISPLAYLIST_GENERIC,
|
||||
DISPLAYLIST_SETTINGS,
|
||||
|
@ -22,6 +22,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_HELP_LIST 0x006af669U
|
||||
#define MENU_LABEL_VALUE_HELP_LIST 0x6c57426aU
|
||||
|
||||
#define MENU_LABEL_VALUE_HELP_CONTROLS 0xe5c9f6a2U
|
||||
#define MENU_LABEL_HELP_CONTROLS 0x04859221U
|
||||
|
||||
#define MENU_LABEL_VALUE_BASIC_MENU_CONTROLS 0x7c05810eU
|
||||
#define MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_UP 0x8c2f7b00U
|
||||
#define MENU_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_DOWN 0x55f0f413U
|
||||
|
@ -2610,8 +2610,8 @@ static bool setting_append_list_main_menu_options(
|
||||
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_SAVE_CONFIG);
|
||||
|
||||
CONFIG_ACTION(
|
||||
menu_hash_to_str(MENU_LABEL_HELP),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_HELP),
|
||||
menu_hash_to_str(MENU_LABEL_HELP_LIST),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_HELP_LIST),
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
parent_group);
|
||||
|
Loading…
x
Reference in New Issue
Block a user