diff --git a/src/menu/optionmenu.cpp b/src/menu/optionmenu.cpp index 57248f891..c6165b6e3 100644 --- a/src/menu/optionmenu.cpp +++ b/src/menu/optionmenu.cpp @@ -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) diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index c108b6623..f0f462880 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -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" diff --git a/wadsrc/static/zscript/menu/optionmenu.txt b/wadsrc/static/zscript/menu/optionmenu.txt new file mode 100644 index 000000000..78feb2336 --- /dev/null +++ b/wadsrc/static/zscript/menu/optionmenu.txt @@ -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); + } +}