mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-11-26 19:50:41 +00:00
add toggle/setting for challenge indicators
This commit is contained in:
parent
7919a87b97
commit
3fe52bb7fb
@ -1184,14 +1184,15 @@ static void rcheevos_lboard_updated(rcheevos_ralboard_t* lboard, int value,
|
||||
static void rcheevos_challenge_started(rcheevos_racheevo_t* cheevo, int value,
|
||||
bool widgets_ready)
|
||||
{
|
||||
if (cheevo && widgets_ready && rcheevos_locals.leaderboard_trackers)
|
||||
settings_t* settings = config_get_ptr();
|
||||
if (cheevo && widgets_ready && settings->bools.cheevos_challenge_indicators)
|
||||
gfx_widgets_set_challenge_display(cheevo->id, cheevo->badge);
|
||||
}
|
||||
|
||||
static void rcheevos_challenge_ended(rcheevos_racheevo_t* cheevo, int value,
|
||||
bool widgets_ready)
|
||||
{
|
||||
if (cheevo && widgets_ready && rcheevos_locals.leaderboard_trackers)
|
||||
if (cheevo && widgets_ready)
|
||||
gfx_widgets_set_challenge_display(cheevo->id, NULL);
|
||||
}
|
||||
|
||||
|
@ -1742,6 +1742,7 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
SETTING_BOOL("cheevos_enable", &settings->bools.cheevos_enable, true, DEFAULT_CHEEVOS_ENABLE, false);
|
||||
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
|
||||
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_challenge_indicators", &settings->bools.cheevos_challenge_indicators, true, true, false);
|
||||
SETTING_BOOL("cheevos_richpresence_enable", &settings->bools.cheevos_richpresence_enable, true, true, false);
|
||||
SETTING_BOOL("cheevos_unlock_sound_enable", &settings->bools.cheevos_unlock_sound_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
||||
|
@ -732,6 +732,7 @@ typedef struct settings
|
||||
bool cheevos_auto_screenshot;
|
||||
bool cheevos_start_active;
|
||||
bool cheevos_unlock_sound_enable;
|
||||
bool cheevos_challenge_indicators;
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
|
@ -121,7 +121,7 @@ static void gfx_widget_leaderboard_display_frame(void* data, void* userdata)
|
||||
|
||||
if (state->challenge_count)
|
||||
{
|
||||
const unsigned widget_size = video_width / 32;
|
||||
const unsigned widget_size = spacing * 4;
|
||||
|
||||
x = video_width;
|
||||
y -= (widget_size + spacing);
|
||||
|
@ -396,6 +396,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_CHEEVOS_START_ACTIVE,
|
||||
"cheevos_start_active"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
"cheevos_challenge_indicators"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CLOSE_CONTENT,
|
||||
"unload_core"
|
||||
|
@ -4980,6 +4980,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_START_ACTIVE,
|
||||
"Start the session with all achievements active (even the ones previously unlocked)."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
"Challenge Indicators"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
"Allows achievements to display an on-screen indicator while the achievement can be earned."
|
||||
)
|
||||
|
||||
/* Settings > Network */
|
||||
|
||||
|
@ -182,6 +182,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_enable, MENU_
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_test_unofficial, MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_hardcore_mode_enable, MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_leaderboards_enable, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_challenge_indicators, MENU_ENUM_SUBLABEL_CHEEVOS_CHALLENGE_INDICATORS)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_richpresence_enable, MENU_ENUM_SUBLABEL_CHEEVOS_RICHPRESENCE_ENABLE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cheevos_badges_enable, MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE)
|
||||
#if defined(HAVE_AUDIOMIXER)
|
||||
@ -3554,6 +3555,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_leaderboards_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_CHALLENGE_INDICATORS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_challenge_indicators);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_RICHPRESENCE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_richpresence_enable);
|
||||
break;
|
||||
|
@ -7382,6 +7382,7 @@ unsigned menu_displaylist_build_list(
|
||||
{MENU_ENUM_LABEL_CHEEVOS_PASSWORD, PARSE_ONLY_STRING, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_HARDCORE_MODE_ENABLE, PARSE_ONLY_BOOL, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE, PARSE_ONLY_STRING_OPTIONS, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_CHALLENGE_INDICATORS, PARSE_ONLY_BOOL, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_RICHPRESENCE_ENABLE, PARSE_ONLY_BOOL, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE, PARSE_ONLY_BOOL, false },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_TEST_UNOFFICIAL, PARSE_ONLY_BOOL, false },
|
||||
|
@ -17908,6 +17908,22 @@ static bool setting_append_list(
|
||||
(*list)[list_info->index - 1].get_string_representation = achievement_leaderboards_get_string_representation;
|
||||
(*list)[list_info->index - 1].free_flags &= ~SD_FREE_FLAG_VALUES;
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_challenge_indicators,
|
||||
MENU_ENUM_LABEL_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_CHALLENGE_INDICATORS,
|
||||
true,
|
||||
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_richpresence_enable,
|
||||
|
@ -1404,6 +1404,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CHEEVOS_UNLOCK_SOUND_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_AUTO_SCREENSHOT),
|
||||
MENU_LABEL(CHEEVOS_START_ACTIVE),
|
||||
MENU_LABEL(CHEEVOS_CHALLENGE_INDICATORS),
|
||||
MENU_LABEL(CHEEVOS_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_DESCRIPTION),
|
||||
MENU_LABEL(ACCOUNTS_RETRO_ACHIEVEMENTS),
|
||||
|
@ -884,6 +884,11 @@
|
||||
# compete for high-scores, speedruns, etc.
|
||||
# cheevos_leaderboards_enable = false
|
||||
|
||||
# Show an on-screen indicator when attempting challenging achievements
|
||||
# to provide feedback when the attempt has failed (for achievements that
|
||||
# support it)
|
||||
# cheevos_challenge_indicators = true
|
||||
|
||||
# Send some messages to the RetroAchievements.org saying, for example,
|
||||
# where you are in the game, how many lives you have, your score, etc.
|
||||
# cheevos_richpresence_enable = true
|
||||
|
Loading…
Reference in New Issue
Block a user