From 37bd4a6ad945142d26440222b9ffc351fb6bdabf Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 10 Apr 2024 19:47:46 -0400 Subject: [PATCH 1/2] Improve profile naming - Profile ID is limited to 6 characters in the keyboard menu itself. - Player Tag is directly under Profile ID. - Minor description changes. --- src/k_menufunc.c | 7 ++++++- src/menus/options-profiles-edit-1.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 25460a6d1..cc05c5419 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -1181,7 +1181,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)) diff --git a/src/menus/options-profiles-edit-1.c b/src/menus/options-profiles-edit-1.c index 32223041c..9599ae456 100644 --- a/src/menus/options-profiles-edit-1.c +++ b/src/menus/options-profiles-edit-1.c @@ -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}, }; From 07b945be29cc8e436dffa9f4981e9de35f4ae8da Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 11 Apr 2024 21:10:14 +0100 Subject: [PATCH 2/2] Fix desynced popt_e order --- src/k_menu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_menu.h b/src/k_menu.h index 1cebc7cd0..23425d29f 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -408,10 +408,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;