mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-22 09:15:02 +00:00
Improve Achievements list
This commit is contained in:
parent
bfe472af09
commit
7aaa39a5db
26
cheevos.c
26
cheevos.c
@ -2196,14 +2196,6 @@ 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_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
||||
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list, "", "", MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
|
||||
cheevo = cheevos_locals.core.cheevos;
|
||||
end = cheevos_locals.core.cheevos + cheevos_locals.core.count;
|
||||
|
||||
@ -2211,7 +2203,7 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
if (!cheevo->active)
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
}
|
||||
|
||||
@ -2225,21 +2217,11 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
if (!cheevo->active)
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
menu_entries_add_enum(info->list, "", "", MSG_UNKNOWN,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS),
|
||||
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list, "", "", MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
|
||||
cheevo = cheevos_locals.core.cheevos;
|
||||
end = cheevos_locals.core.cheevos + cheevos_locals.core.count;
|
||||
|
||||
@ -2247,7 +2229,7 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
if (cheevo->active)
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
}
|
||||
|
||||
@ -2261,7 +2243,7 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
if (cheevo->active)
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1184,8 +1184,10 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "input_libretro_device_p%u";
|
||||
case MENU_ENUM_LABEL_RUN:
|
||||
return "collection";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENTRY:
|
||||
return "cheevos_entry";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
return "cheevos_locked_entry";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY:
|
||||
return "cheevos_unlocked_entry";
|
||||
case MENU_ENUM_LABEL_FILEBROWSER_ENTRY:
|
||||
return "filebrowser_entry";
|
||||
case MENU_ENUM_LABEL_CORE_INFO_ENTRY:
|
||||
|
@ -61,7 +61,7 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||
snprintf(s, len, "%u", cheat_manager_get_buf_size());
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheevos_entry(
|
||||
static void menu_action_setting_disp_set_label_cheevos_locked_entry(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
@ -72,7 +72,21 @@ static void menu_action_setting_disp_set_label_cheevos_entry(
|
||||
{
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s, "", len);
|
||||
strlcpy(s, "Locked", len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheevos_unlocked_entry(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s, "Unlocked", len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
@ -1738,9 +1752,13 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
switch (cbs->enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENTRY:
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_entry);
|
||||
menu_action_setting_disp_set_label_cheevos_unlocked_entry);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_locked_entry);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
|
@ -284,7 +284,8 @@ enum msg_hash_enums
|
||||
MSG_EXTRACTING_FILE,
|
||||
MSG_NO_CONTENT_STARTING_DUMMY_CORE,
|
||||
|
||||
MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_FILEBROWSER_ENTRY,
|
||||
MENU_ENUM_LABEL_SHADER_PARAMETERS_ENTRY,
|
||||
MENU_ENUM_LABEL_RDB_ENTRY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user