Profile edit polish

- Rename the Name fields to "Profile ID" and "Player Tag" respectively, for clarity
- Re-order and re-align, so the given area on the Profile Card is lined up for readability
- Use the smaller version of the gamemode font, to have the screen less crammed full
This commit is contained in:
toaster 2023-12-04 13:27:47 +00:00
parent 36c3dbfc0e
commit 17c0ceba23
3 changed files with 38 additions and 35 deletions

View file

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

View file

@ -4026,7 +4026,7 @@ void M_DrawEditProfile(void)
{
INT32 y = 34;
INT32 x = 145;
INT32 x = (145 + (menutransition.tics*32));
INT32 i;
M_DrawOptionsCogs();
@ -4046,33 +4046,34 @@ void M_DrawEditProfile(void)
UINT8 *colormap = NULL;
INT32 tflag = (currentMenu->menuitems[i].status & IT_TRANSTEXT) ? V_TRANSLUCENT : 0;
y = currentMenu->menuitems[i].mvar2;
// Background -- 169 is the plague colourization
V_DrawFill(0, y, 400 - (menutransition.tics*64), 10, itemOn == i ? 169 : 30);
if (i == itemOn)
{
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_CACHE);
// Background
V_DrawFill(0, y, 400 - (menutransition.tics*64), 24, itemOn == i ? 169 : 30); // 169 is the plague colourization
V_DrawCharacter(x - 10 - (skullAnimCounter/5), y+1,
'\x1C' | highlightflags, false); // left arrow
}
// Text
V_DrawGamemodeString(x + (menutransition.tics*32), y - 6, tflag, colormap, currentMenu->menuitems[i].text);
//V_DrawGamemodeString(x, y - 6, tflag, colormap, currentMenu->menuitems[i].text);
V_DrawStringScaled(
x * FRACUNIT,
(y - 3) * FRACUNIT,
FRACUNIT,
FRACUNIT,
FRACUNIT,
tflag,
colormap,
KART_FONT,
currentMenu->menuitems[i].text
);
// Cvar specific handling
/*switch (currentMenu->menuitems[i].status & IT_TYPE)
{
case IT_CVAR:
{
consvar_t *cv = currentMenu->menuitems[i].itemaction.cvar;
switch (currentMenu->menuitems[i].status & IT_CVARTYPE)
{
case IT_CV_STRING:
V_DrawFill(0, y+24, 400 - (menutransition.tics*64), 16, itemOn == i ? 169 : 30); // 169 is the plague colourization
V_DrawString(x + 8, y + 29, 0, cv->string);
if (skullAnimCounter < 4 && i == itemOn)
V_DrawCharacter(x + 8 + V_StringWidth(cv->string, 0), y + 29, '_', false);
y += 16;
}
}
}*/
y += 34;
//y += 32 + 2;
}
// Finally, draw the card ontop

View file

@ -5,21 +5,23 @@
#include "../s_sound.h"
#include "../m_cond.h"
// 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 Name", "6-character long name to identify this Profile.",
NULL, {.cvar = &cv_dummyprofilename}, 0, 0},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Name", "Name displayed online when using this Profile.",
NULL, {.cvar = &cv_dummyprofileplayername}, 0, 0},
{IT_STRING | IT_CALL, "Character", "Default character and color for this Profile.",
NULL, {.routine = M_CharacterSelect}, 0, 0},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Profile ID", "6-character long name to identify this Profile.",
NULL, {.cvar = &cv_dummyprofilename}, 0, 41},
{IT_STRING | IT_CALL, "Controls", "Select the button mappings for this Profile.",
NULL, {.routine = M_ProfileDeviceSelect}, 0, 0},
NULL, {.routine = M_ProfileDeviceSelect}, 0, 81},
{IT_STRING | IT_CALL, "Character", "Default character and color for this Profile.",
NULL, {.routine = M_CharacterSelect}, 0, 101},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Player Tag", "Name displayed online when using this Profile.",
NULL, {.cvar = &cv_dummyprofileplayername}, 0, 141},
{IT_STRING | IT_CALL, "Confirm", "Confirm changes.",
NULL, {.routine = M_ConfirmProfile}, 0, 0},
NULL, {.routine = M_ConfirmProfile}, 0, 171},
};