mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Achievement Visibility Submenu - Additional changes
- 'Unlocks/Mastery' split into two options - 'Account/Login Messages' split off from 'Verbose', gated all login success/error messages - menu_cbs_sublabel.c - Now in same order as menu options - menu_setting.c - VISIBILITY_UNLOCK default value now uses define - All suggested text/cleanup changes from Jamiras
This commit is contained in:
parent
1bf31d84db
commit
31addc0a61
@ -1480,7 +1480,7 @@ void rcheevos_show_mastery_placard(void)
|
||||
title[sizeof(title) - 1] = '\0';
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "%s\n", title);
|
||||
|
||||
if (settings->bools.cheevos_visibility_unlock)
|
||||
if (settings->bools.cheevos_visibility_mastery)
|
||||
{
|
||||
#if defined (HAVE_GFX_WIDGETS)
|
||||
if (gfx_widgets_ready())
|
||||
@ -1736,7 +1736,7 @@ static void rcheevos_fetch_game_data(void)
|
||||
const settings_t* settings = config_get_ptr();
|
||||
if (settings->bools.cheevos_verbose_enable)
|
||||
runloop_msg_queue_push(
|
||||
"This game has no achievements.",
|
||||
"RetroAchivements: Game could not be identified.",
|
||||
0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Game could not be identified\n");
|
||||
@ -1946,7 +1946,7 @@ static void rcheevos_login_callback(void* userdata)
|
||||
if (rcheevos_locals.token[0])
|
||||
{
|
||||
const settings_t* settings = config_get_ptr();
|
||||
if (settings->bools.cheevos_verbose_enable)
|
||||
if (settings->bools.cheevos_visibility_account)
|
||||
{
|
||||
char msg[256];
|
||||
msg[0] = '\0';
|
||||
@ -2044,6 +2044,7 @@ bool rcheevos_load(const void *data)
|
||||
if (string_is_empty(settings->arrays.cheevos_username))
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Cannot login (no username)\n");
|
||||
if (settings->bools.cheevos_visibility_account)
|
||||
runloop_msg_queue_push("Missing RetroAchievements account information.", 0, 5 * 60, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
rcheevos_locals.game.id = 0;
|
||||
@ -2133,6 +2134,7 @@ bool rcheevos_load(const void *data)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Cannot login %s (no password or token)\n",
|
||||
settings->arrays.cheevos_username);
|
||||
if (settings->bools.cheevos_visibility_account)
|
||||
runloop_msg_queue_push("No password provided for RetroAchievements account", 0, 5 * 60, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
rcheevos_unload();
|
||||
|
@ -116,7 +116,6 @@ enum rcheevos_summary_notif
|
||||
RCHEEVOS_SUMMARY_HASCHEEVOS,
|
||||
RCHEEVOS_SUMMARY_OFF,
|
||||
RCHEEVOS_SUMMARY_LAST
|
||||
|
||||
};
|
||||
|
||||
typedef struct rcheevos_load_info_t
|
||||
|
@ -191,6 +191,8 @@
|
||||
#define DEFAULT_CHEEVOS_APPEARANCE_PADDING_V 0.0f
|
||||
#define DEFAULT_CHEEVOS_VISIBILITY_SUMMARY 1 /* RCHEEVOS_SUMMARY_HASCHEEVOS */
|
||||
#define DEFAULT_CHEEVOS_VISIBILITY_UNLOCK true
|
||||
#define DEFAULT_CHEEVOS_VISIBILITY_MASTERY true
|
||||
#define DEFAULT_CHEEVOS_VISIBILITY_ACCOUNT true
|
||||
#endif
|
||||
|
||||
/* VIDEO */
|
||||
|
@ -1953,6 +1953,8 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
SETTING_BOOL("cheevos_start_active", &settings->bools.cheevos_start_active, true, false, false);
|
||||
SETTING_BOOL("cheevos_appearance_padding_auto", &settings->bools.cheevos_appearance_padding_auto, true, DEFAULT_CHEEVOS_APPEARANCE_PADDING_AUTO, false);
|
||||
SETTING_BOOL("cheevos_visibility_unlock", &settings->bools.cheevos_visibility_unlock, true, DEFAULT_CHEEVOS_VISIBILITY_UNLOCK, false);
|
||||
SETTING_BOOL("cheevos_visibility_mastery", &settings->bools.cheevos_visibility_mastery, true, DEFAULT_CHEEVOS_VISIBILITY_MASTERY, false);
|
||||
SETTING_BOOL("cheevos_visibility_account", &settings->bools.cheevos_visibility_account, true, DEFAULT_CHEEVOS_VISIBILITY_ACCOUNT, false);
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false);
|
||||
|
@ -838,6 +838,8 @@ typedef struct settings
|
||||
bool cheevos_challenge_indicators;
|
||||
bool cheevos_appearance_padding_auto;
|
||||
bool cheevos_visibility_unlock;
|
||||
bool cheevos_visibility_mastery;
|
||||
bool cheevos_visibility_account;
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
|
@ -464,6 +464,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
"cheevos_visibility_unlock"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_MASTERY,
|
||||
"cheevos_visibility_mastery"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
"cheevos_visibility_account"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CLOSE_CONTENT,
|
||||
"unload_core"
|
||||
|
@ -6127,11 +6127,11 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_SUMMARY,
|
||||
"Shows information about the game being loaded and the user's current progress.\n'All Games in Database' will show summary for games with no published achievements."
|
||||
"Shows information about the game being loaded and the user's current progress.\n'All Identified Games' will show summary for games with no published achievements."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_SUMMARY_ALLGAMES,
|
||||
"All Games in Database"
|
||||
"All Identified Games"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_SUMMARY_HASCHEEVOS,
|
||||
@ -6139,11 +6139,19 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
"New Unlocks/Mastery"
|
||||
"Unlock Notifications"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
"Shows when a new achievement is unlocked or a game is mastered."
|
||||
"Shows a notification when an achievement is unlocked."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_MASTERY,
|
||||
"Mastery Notifications"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_MASTERY,
|
||||
"Shows a notification when a game is mastered (all achievements unlocked)."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
@ -6151,15 +6159,23 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
"Shows on-screen indicators while some conditional achievements can be earned."
|
||||
"Shows on-screen indicators while certain achievements can be earned."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
"Account/Login Messages"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
"Shows messages related to RetroAchievements account login."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Verbose Mode"
|
||||
"Verbose Messages"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Shows additional messages for accounts and other internal errors/problems."
|
||||
"Shows additional diagnostic and error messages."
|
||||
)
|
||||
|
||||
/* Settings > Network */
|
||||
|
@ -312,8 +312,10 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_appearance_padding_auto, MEN
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_appearance_padding_h, MENU_ENUM_SUBLABEL_CHEEVOS_APPEARANCE_PADDING_H)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_appearance_padding_v, MENU_ENUM_SUBLABEL_CHEEVOS_APPEARANCE_PADDING_V)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_settings, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_SETTINGS)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_unlock, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_UNLOCK)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_summary, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_SUMMARY)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_unlock, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_UNLOCK)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_mastery, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_MASTERY)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_visibility_account, MENU_ENUM_SUBLABEL_CHEEVOS_VISIBILITY_ACCOUNT)
|
||||
|
||||
#endif
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_views_settings_list, MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS)
|
||||
@ -4318,11 +4320,17 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_SETTINGS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_settings);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_SUMMARY:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_summary);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_UNLOCK:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_unlock);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_SUMMARY:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_summary);
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_MASTERY:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_mastery);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_ACCOUNT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_visibility_account);
|
||||
break;
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_SETTINGS:
|
||||
|
@ -8423,7 +8423,9 @@ unsigned menu_displaylist_build_list(
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_SUMMARY, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_UNLOCK, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_MASTERY, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CHEEVOS_CHALLENGE_INDICATORS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_ACCOUNT, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE, PARSE_ONLY_BOOL, true},
|
||||
};
|
||||
|
||||
|
@ -20251,7 +20251,23 @@ static bool setting_append_list(
|
||||
&settings->bools.cheevos_visibility_unlock,
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
true,
|
||||
DEFAULT_CHEEVOS_VISIBILITY_UNLOCK,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_visibility_mastery,
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_MASTERY,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_MASTERY,
|
||||
DEFAULT_CHEEVOS_VISIBILITY_MASTERY,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
@ -20294,6 +20310,23 @@ static bool setting_append_list(
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_visibility_account,
|
||||
MENU_ENUM_LABEL_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
DEFAULT_CHEEVOS_VISIBILITY_ACCOUNT,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
#endif
|
||||
|
@ -1666,6 +1666,8 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CHEEVOS_VISIBILITY_SETTINGS),
|
||||
MENU_LABEL(CHEEVOS_VISIBILITY_SUMMARY),
|
||||
MENU_LABEL(CHEEVOS_VISIBILITY_UNLOCK),
|
||||
MENU_LABEL(CHEEVOS_VISIBILITY_MASTERY),
|
||||
MENU_LABEL(CHEEVOS_VISIBILITY_ACCOUNT),
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_SUMMARY_ALLGAMES,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VISIBILITY_SUMMARY_HASCHEEVOS,
|
||||
|
Loading…
Reference in New Issue
Block a user