Profile edit character select: Get transition to work

This commit is contained in:
toaster 2023-12-04 13:44:15 +00:00
parent 17c0ceba23
commit 792fcf2ad8
3 changed files with 20 additions and 7 deletions

View file

@ -1201,6 +1201,7 @@ void M_DrawKickHandler(void);
void M_DrawPlaybackMenu(void); void M_DrawPlaybackMenu(void);
// Options menus: // Options menus:
void M_DrawOptionsCogs(void);
void M_DrawOptionsMovingButton(void); // for sick transitions... void M_DrawOptionsMovingButton(void); // for sick transitions...
void M_DrawOptions(void); void M_DrawOptions(void);
void M_DrawGenericOptions(void); void M_DrawGenericOptions(void);

View file

@ -2151,22 +2151,31 @@ void M_DrawCharacterSelect(void)
UINT8 priority = 0; UINT8 priority = 0;
INT16 quadx, quady; INT16 quadx, quady;
INT16 skin; INT16 skin;
INT32 basex = optionsmenu.profile != NULL ? 64 : 0; INT32 basex = 0;
boolean forceskin = (Playing() && K_CanChangeRules(true) == true) && (cv_forceskin.value != -1); boolean forceskin = (Playing() && K_CanChangeRules(true) == true) && (cv_forceskin.value != -1);
if (optionsmenu.profile)
{
basex = (64 + (menutransition.tics*32));
M_DrawOptionsCogs();
}
if (setup_numplayers > 0) if (setup_numplayers > 0)
{ {
priority = setup_animcounter % setup_numplayers; priority = setup_animcounter % setup_numplayers;
} }
{ {
const int kLeft = 80; const int kLeft = 76;
const int kTop = 6; const int kTop = 6;
const int kButtonWidth = 16; const int kButtonWidth = 16;
INT32 x = basex + kLeft; INT32 x = basex + kLeft;
K_drawButton((x += 18) * FRACUNIT, (kTop - 3) * FRACUNIT, 0, kp_button_r, M_MenuButtonPressed(pid, MBT_R)); if (!optionsmenu.profile) // Does nothing on this screen
V_DrawThinString((x += kButtonWidth), kTop, 0, "Info"); {
K_drawButton((x += 22) * FRACUNIT, (kTop - 3) * FRACUNIT, 0, kp_button_r, M_MenuButtonPressed(pid, MBT_R));
V_DrawThinString((x += kButtonWidth), kTop, 0, "Info");
}
K_drawButton((x += 58) * FRACUNIT, (kTop - 1) * FRACUNIT, 0, kp_button_c[1], M_MenuButtonPressed(pid, MBT_C)); K_drawButton((x += 58) * FRACUNIT, (kTop - 1) * FRACUNIT, 0, kp_button_c[1], M_MenuButtonPressed(pid, MBT_C));
V_DrawThinString((x += kButtonWidth), kTop, 0, "Default"); V_DrawThinString((x += kButtonWidth), kTop, 0, "Default");
@ -3730,7 +3739,7 @@ void M_DrawMPServerBrowser(void)
// OPTIONS MENU // OPTIONS MENU
// Draws the cogs and also the options background! // Draws the cogs and also the options background!
static void M_DrawOptionsCogs(void) void M_DrawOptionsCogs(void)
{ {
// the background isn't drawn outside of being in the main menu state. // the background isn't drawn outside of being in the main menu state.
if (gamestate == GS_MENU) if (gamestate == GS_MENU)

View file

@ -22,10 +22,10 @@ menu_t PLAY_CharSelectDef = {
0, 0,
PLAY_CharSelect, PLAY_CharSelect,
0, 0, 0, 0,
0, 0, SKINCOLOR_ULTRAMARINE, 0,
0, 0,
NULL, NULL,
0, 0, 2, 5, // matches OPTIONS_EditProfileDef
M_DrawCharacterSelect, M_DrawCharacterSelect,
M_CharacterSelectTick, M_CharacterSelectTick,
M_CharacterSelectInit, M_CharacterSelectInit,
@ -1409,6 +1409,9 @@ void M_CharacterSelectTick(void)
M_MPConfirmCharacterSelection(); M_MPConfirmCharacterSelection();
} }
} }
if (optionsmenu.profile)
M_OptionsTick();
} }
boolean M_CharacterSelectQuit(void) boolean M_CharacterSelectQuit(void)