Start using menu_entries_add_enum for cheevos

This commit is contained in:
twinaphex 2016-06-16 15:33:16 +02:00
parent 2d61c6d2ed
commit 64cb4b53df
3 changed files with 23 additions and 3 deletions

View File

@ -2185,8 +2185,11 @@ void cheevos_populate_menu(void *data)
settings_t *settings = config_get_ptr();
menu_displaylist_info_t *info = (menu_displaylist_info_t*)data;
menu_entries_add(info->list, "Unlocked Achievements:",
"", MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
menu_entries_add_enum(info->list,
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
menu_hash_to_str_enum(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
menu_entries_add(info->list, "", "", MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
cheevo = cheevos_locals.core.cheevos;
@ -2214,7 +2217,10 @@ void cheevos_populate_menu(void *data)
}
menu_entries_add(info->list, "", "", MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
menu_entries_add(info->list, "Locked Achievements:", "",
menu_entries_add_enum(info->list,
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS),
menu_hash_to_str_enum(MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS),
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
menu_entries_add(info->list, "", "", MENU_SETTINGS_CHEEVOS_NONE, 0, 0);

View File

@ -26,6 +26,10 @@ static const char *menu_hash_to_str_us_label_enum(enum menu_hash_enums msg)
{
switch (msg)
{
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
return "cheevos_unlocked_achievements";
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS:
return "cheevos_locked_achievements";
case MENU_ENUM_LABEL_MAIN_MENU:
return "main_menu";
case MENU_ENUM_LABEL_MENU_LINEAR_FILTER:
@ -762,6 +766,10 @@ const char *menu_hash_to_str_us_enum(enum menu_hash_enums msg)
switch (msg)
{
case MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
return "Unlocked Achievements:";
case MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS:
return "Locked Achievements:";
case MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD:
return "Start Remote RetroPad";
case MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST:

View File

@ -121,6 +121,12 @@ enum menu_hash_enums
MENU_ENUM_LABEL_ACCOUNTS_CHEEVOS_USERNAME,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME,
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS,
MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS,