diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 3479da342..b5e1bd91c 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -6,10 +6,10 @@ LISTMENU "MainMenu" { - /* - class "$.MainMenu" + //class "$.MainMenu" ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides) { + /* position 160, 55, 115 centermenu animatedtransition @@ -20,11 +20,13 @@ LISTMENU "MainMenu" NativeTextItem "$MNU_HELP", "h", "HelpMenu" NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" + */ } ifgame(Blood) { + CaptionItem "Blood" + /* position 160, 45, 150 - caption "Blood" centermenu Linespacing 20 NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" @@ -34,9 +36,11 @@ LISTMENU "MainMenu" NativeTextItem "$MNU_HELP", "h", "HelpMenu" NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" + */ } ifgame(ShadowWarrior) { + /* Position 55, 32 Linespacing 17 NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" @@ -53,9 +57,11 @@ LISTMENU "MainMenu" NativeTextItem "$MNU_HOWTOORDER", "h", "CreditsMenu" } NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" + */ } ifgame(Exhumed) { + /* Position 160, 65 centermenu linespacing 22 @@ -64,8 +70,8 @@ LISTMENU "MainMenu" NativeTextItem "3462", "m", "StartGame", 0 NativeTextItem "3463", "v", "OptionsMenu" NativeTextItem "3464", "q", "QuitMenu" - } */ + } } //------------------------------------------------------------------------------------------- diff --git a/wadsrc/static/zscript/ui/menu/listmenuitems.zs b/wadsrc/static/zscript/ui/menu/listmenuitems.zs index dafbfd5d2..be66bcd8c 100644 --- a/wadsrc/static/zscript/ui/menu/listmenuitems.zs +++ b/wadsrc/static/zscript/ui/menu/listmenuitems.zs @@ -340,3 +340,31 @@ class ListMenuItemPatchItem : ListMenuItemSelectable } +//============================================================================= +// +// caption - draws a text using the customizer's caption hook +// +//============================================================================= + +class ListMenuItemCaptionItem : ListMenuItem +{ + String mText; + Font mFont; + + void Init(ListMenuDescriptor desc, String text, String fnt = "BigFont") + { + Super.Init(0, 0); + mText = text; + mFont = Font.FindFont(fnt); + } + + override void Draw(bool selected, ListMenuDescriptor desc) + { + let font = generic_ui || !desc.mFont ? NewSmallFont : desc.mFont; + if (font && mText.Length() > 0) + { + menuCustomizer.DrawCaption(mText, font, 0, true); + } + } +} +