Profile Edit: Make the tooltip for "Character" dependent on whether you've gotten any Spray Cans.

I imagine people might have been confused by not being able to select their desired skincolour
This commit is contained in:
toaster 2024-03-21 22:13:07 +00:00
parent 72472d6ae1
commit fd2167e29c
2 changed files with 9 additions and 1 deletions

View file

@ -4,6 +4,7 @@
#include "../i_time.h" #include "../i_time.h"
#include "../k_menu.h" #include "../k_menu.h"
#include "../s_sound.h" #include "../s_sound.h"
#include "../m_cond.h"
// profile select // profile select
menuitem_t OPTIONS_Profiles[] = { menuitem_t OPTIONS_Profiles[] = {
@ -118,6 +119,13 @@ void M_StartEditProfile(INT32 c)
OPTIONS_EditProfile[popt_char].status |= IT_TRANSTEXT; OPTIONS_EditProfile[popt_char].status |= IT_TRANSTEXT;
} }
// Setup variable tooltips.
OPTIONS_EditProfile[popt_char].tooltip = (
(gamedata && gamedata->numspraycans != 0 && gamedata->gotspraycans != 0)
? "Default character and color."
: "Default character."
);
OPTIONS_EditProfileDef.prevMenu = currentMenu; OPTIONS_EditProfileDef.prevMenu = currentMenu;
M_SetupNextMenu(&OPTIONS_EditProfileDef, false); M_SetupNextMenu(&OPTIONS_EditProfileDef, false);
return; return;

View file

@ -18,7 +18,7 @@ menuitem_t OPTIONS_EditProfile[] = {
{IT_STRING | IT_SUBMENU, "Accessibility", "Acccessibility and quality of life options.", {IT_STRING | IT_SUBMENU, "Accessibility", "Acccessibility and quality of life options.",
NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 91}, NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 91},
{IT_STRING | IT_CALL, "Character", "Default character and color.", {IT_STRING | IT_CALL, "Character", NULL, // tooltip set in M_StartEditProfile
NULL, {.routine = M_CharacterSelect}, 0, 111}, NULL, {.routine = M_CharacterSelect}, 0, 111},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online and in replays.", {IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online and in replays.",