Merge branch 'profile-naming-improvement' into 'master'

Improve profile naming

See merge request KartKrew/Kart!2265
This commit is contained in:
Sal 2024-04-11 21:57:23 +00:00
commit 7ea0d5e314
3 changed files with 15 additions and 10 deletions

View file

@ -438,10 +438,10 @@ extern menu_t MAIN_ProfilesDef;
typedef enum
{
popt_profilename = 0,
popt_profilepname,
popt_controls,
popt_accessibility,
popt_char,
popt_profilepname,
popt_confirm,
} popt_e;

View file

@ -1213,7 +1213,12 @@ static void M_HandleMenuInput(void)
if (M_MenuConfirmPressed(pid))
{
// If we entered this menu by pressing a menu Key, default to keyboard typing, otherwise use controller.
M_OpenVirtualKeyboard(MAXSTRINGLENGTH, M_QueryCvarAction, NULL);
M_OpenVirtualKeyboard(
(currentMenu->menuitems[itemOn].itemaction.cvar == &cv_dummyprofilename) ? 6 // this sucks, but there's no time.
: MAXSTRINGLENGTH,
M_QueryCvarAction,
NULL
);
return;
}
else if (M_MenuExtraPressed(pid))

View file

@ -18,23 +18,23 @@
// These are placed in descending order next to the things they modify, for clarity.
// Try to keep the mvar2 in order, if you add new profile info!!
menuitem_t OPTIONS_EditProfile[] = {
{IT_STRING | IT_CVAR | IT_CV_STRING, "Profile ID", "6-character long name to identify this Profile.",
{IT_STRING | IT_CVAR | IT_CV_STRING, "Profile ID", "6-character long name to display on menus.",
NULL, {.cvar = &cv_dummyprofilename}, 0, 41},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Full name, displayed online and in replays.",
NULL, {.cvar = &cv_dummyprofileplayername}, 0, 61},
{IT_STRING | IT_CALL, "Controls", "Change the button mappings.",
NULL, {.routine = M_ProfileDeviceSelect}, 0, 71},
NULL, {.routine = M_ProfileDeviceSelect}, 0, 91},
{IT_STRING | IT_SUBMENU, "Accessibility", "Acccessibility and quality of life options.",
NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 91},
NULL, {.submenu = &OPTIONS_ProfileAccessibilityDef}, 0, 111},
{IT_STRING | IT_CALL, "Character", NULL, // tooltip set in M_StartEditProfile
NULL, {.routine = M_CharacterSelect}, 0, 111},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online and in replays.",
NULL, {.cvar = &cv_dummyprofileplayername}, 0, 141},
NULL, {.routine = M_CharacterSelect}, 0, 131},
{IT_STRING | IT_CALL, "Confirm", "Confirm changes.",
NULL, {.routine = M_ConfirmProfile}, 0, 171},
NULL, {.routine = M_ConfirmProfile}, 0, 171},
};