mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- scriptified the CVar printers for the gameplay and compatibility menus.
This commit is contained in:
parent
2b977f70e6
commit
12db190f41
3 changed files with 32 additions and 46 deletions
|
@ -510,49 +510,3 @@ DMenuItemBase *DOptionMenuDescriptor::GetItem(FName name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class DGameplayMenu : public DOptionMenu
|
||||
{
|
||||
DECLARE_CLASS(DGameplayMenu, DOptionMenu)
|
||||
|
||||
public:
|
||||
DGameplayMenu()
|
||||
{}
|
||||
|
||||
void Drawer ()
|
||||
{
|
||||
Super::Drawer();
|
||||
|
||||
char text[64];
|
||||
mysnprintf(text, 64, "dmflags = %d dmflags2 = %d", *dmflags, *dmflags2);
|
||||
screen->DrawText (SmallFont, OptionSettings.mFontColorValue,
|
||||
(screen->GetWidth() - SmallFont->StringWidth (text) * CleanXfac_1) / 2, 0, text,
|
||||
DTA_CleanNoMove_1, true, TAG_DONE);
|
||||
}
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS(DGameplayMenu, false, false)
|
||||
|
||||
class DCompatibilityMenu : public DOptionMenu
|
||||
{
|
||||
DECLARE_CLASS(DCompatibilityMenu, DOptionMenu)
|
||||
|
||||
public:
|
||||
DCompatibilityMenu()
|
||||
{}
|
||||
|
||||
void Drawer ()
|
||||
{
|
||||
Super::Drawer();
|
||||
|
||||
char text[64];
|
||||
mysnprintf(text, 64, "compatflags = %d compatflags2 = %d", *compatflags, *compatflags2);
|
||||
screen->DrawText (SmallFont, OptionSettings.mFontColorValue,
|
||||
(screen->GetWidth() - SmallFont->StringWidth (text) * CleanXfac_1) / 2, 0, text,
|
||||
DTA_CleanNoMove_1, true, TAG_DONE);
|
||||
}
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS(DCompatibilityMenu, false, false)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "zscript/menu/menuitembase.txt"
|
||||
#include "zscript/menu/menu.txt"
|
||||
#include "zscript/menu/listmenuitems.txt"
|
||||
#include "zscript/menu/optionmenu.txt"
|
||||
#include "zscript/menu/optionmenuitems.txt"
|
||||
#include "zscript/menu/colorpickermenu.txt"
|
||||
#include "zscript/menu/joystickmenu.txt"
|
||||
|
|
31
wadsrc/static/zscript/menu/optionmenu.txt
Normal file
31
wadsrc/static/zscript/menu/optionmenu.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class GameplayMenu : OptionMenu
|
||||
{
|
||||
override void Drawer ()
|
||||
{
|
||||
Super.Drawer();
|
||||
|
||||
String s = String.Format("dmflags = %d dmflags2 = %d", dmflags, dmflags2);
|
||||
screen.DrawText (SmallFont, OptionMenuSettings.mFontColorValue,
|
||||
(screen.GetWidth() - SmallFont.StringWidth (s) * CleanXfac_1) / 2, 0, s,
|
||||
DTA_CleanNoMove_1, true);
|
||||
}
|
||||
}
|
||||
|
||||
class CompatibilityMenu : OptionMenu
|
||||
{
|
||||
override void Drawer ()
|
||||
{
|
||||
Super.Drawer();
|
||||
|
||||
String s = String.Format("compatflags = %d compatflags2 = %d", compatflags, compatflags2);
|
||||
screen.DrawText (SmallFont, OptionMenuSettings.mFontColorValue,
|
||||
(screen.GetWidth() - SmallFont.StringWidth (s) * CleanXfac_1) / 2, 0, s,
|
||||
DTA_CleanNoMove_1, true);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue