- fixed compile errors in menu code.

This commit is contained in:
Christoph Oelckers 2019-11-30 10:03:20 +01:00
parent 3c4c8af20c
commit d5c3991c2e
6 changed files with 10 additions and 10 deletions

View File

@ -417,7 +417,7 @@ protected:
FString EndString;
EndString.Format("%s" TEXTCOLOR_WHITE "%s" TEXTCOLOR_NORMAL "?\n\n%s",
GStrings("MNU_DELETESG"), manager.GetSavegame(Selected)->SaveTitle.GetChars(), GStrings("PRESSYN"));
M_StartMessage(EndString, 0);
M_StartMessage(EndString, 0, -1);
}
return true;
}

View File

@ -98,10 +98,12 @@ enum EMenuSounds : int
AdvanceSound,
BackSound,
CloseSound,
PageSound
PageSound,
ChangeSound
};
EXTERN_CVAR(Bool, menu_sounds)
struct event_t;
class FTexture;
class FFont;

View File

@ -879,11 +879,11 @@ static void ParseOptionMenuBody(FScanner &sc, FOptionMenuDescriptor *desc)
{
sc.MustGetString();
FString label = sc.String;
bool cr = false;
EColorRange cr = OptionSettings.mFontColorHeader;
if (sc.CheckString(","))
{
sc.MustGetNumber();
cr = !!sc.Number;
cr = sc.Number? OptionSettings.mFontColorHeader : OptionSettings.mFontColor; // fixme!
}
FOptionMenuItem *it = new FOptionMenuItemStaticText(label, cr);
desc->mItems.Push(it);
@ -898,11 +898,11 @@ static void ParseOptionMenuBody(FScanner &sc, FOptionMenuDescriptor *desc)
sc.MustGetStringName(",");
sc.MustGetString();
FName action = sc.String;
bool cr = false;
EColorRange cr = OptionSettings.mFontColorHeader;
if (sc.CheckString(","))
{
sc.MustGetNumber();
cr = !!sc.Number;
cr = sc.Number ? OptionSettings.mFontColorHeader : OptionSettings.mFontColor; // fixme!
}
FOptionMenuItem *it = new FOptionMenuItemStaticTextSwitchable(label, label2, action, cr);
desc->mItems.Push(it);

View File

@ -34,6 +34,7 @@
#include "v_text.h"
#include "v_draw.h"
#include "gstrings.h"
#include "v_font.h"
void M_DrawConText (int color, int x, int y, const char *str);
@ -901,7 +902,7 @@ public:
M_MenuSound(AdvanceSound);
mEditName = GetCVarString();
mEntering = true;
DMenu* input = new DTextEnterMenu ( DMenu::CurrentMenu, mEditName, sizeof mEditName, 2, fromcontroller );
DMenu* input = new DTextEnterMenu(DMenu::CurrentMenu, NewSmallFont, mEditName, 256, fromcontroller );
M_ActivateMenu( input );
return true;
}

View File

@ -507,8 +507,6 @@ void GameInterface::CustomMenuSelection(int menu, int item)
VM_OnEventWithReturn(EVENT_NEWGAMECUSTOM, -1, myconnectindex, menu);
}
EXTERN_CVAR(Bool, menu_sounds)
void GameInterface::StartGame(FGameStartup& gs)
{
int32_t skillsound = PISTOL_BODYHIT;

View File

@ -426,7 +426,6 @@ bool GameInterface::CanSave()
return true;
}
EXTERN_CVAR(Bool, menu_sounds)
void GameInterface::StartGame(FGameStartup& gs)
{
int32_t skillsound = PISTOL_BODYHIT;