From eb668180c8a53f973fc6058d98995288a862f243 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Dec 2019 21:44:50 +0100 Subject: [PATCH] - implemented help and credits menu for Blood. --- source/blood/src/d_menu.cpp | 2 +- source/common/menu/imagescroller.cpp | 1 + source/common/menu/menudef.cpp | 1 + source/common/utility/stringtable.h | 2 +- wadsrc/static/demolition/menudef.txt | 5 ++++- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/blood/src/d_menu.cpp b/source/blood/src/d_menu.cpp index 5b8e74b17..847703615 100644 --- a/source/blood/src/d_menu.cpp +++ b/source/blood/src/d_menu.cpp @@ -181,7 +181,7 @@ protected: void PostDraw() { - itemBloodQAV->Draw(); + //itemBloodQAV->Draw(); } }; diff --git a/source/common/menu/imagescroller.cpp b/source/common/menu/imagescroller.cpp index b9446463a..92bb9220d 100644 --- a/source/common/menu/imagescroller.cpp +++ b/source/common/menu/imagescroller.cpp @@ -102,6 +102,7 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller) if (pageTransition.current) pageTransition.current->origin = { 0,0 }; return DMenu::MenuEvent(mkey, fromcontroller); + case MKEY_Left: if (pageTransition.previous == nullptr) { diff --git a/source/common/menu/menudef.cpp b/source/common/menu/menudef.cpp index 4af11fb44..86f2fbd75 100644 --- a/source/common/menu/menudef.cpp +++ b/source/common/menu/menudef.cpp @@ -644,6 +644,7 @@ static void ParseImageScroller(FScanner &sc) FImageScrollerDescriptor *desc = new FImageScrollerDescriptor; desc->mType = MDESC_ImageScroller; desc->mMenuName = sc.String; + desc->mClass = NAME_None; ParseImageScrollerBody(sc, desc); bool scratch = ReplaceMenu(sc, desc); diff --git a/source/common/utility/stringtable.h b/source/common/utility/stringtable.h index e66f45eee..f18c5315a 100644 --- a/source/common/utility/stringtable.h +++ b/source/common/utility/stringtable.h @@ -126,7 +126,7 @@ public: const char* localize(const char* str) { - return *str == '$' ? GetString(str + 1, nullptr) : str; + return *str == '$' ? operator()(str + 1) : str; } }; diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index 65223ff78..825992f80 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -116,11 +116,12 @@ LISTMENU "IngameMenu" centermenu Linespacing 17 NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" - NativeTextItem "$MNU_MULTIPLAYER", "m", "MultiMenu" NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" + NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" NativeTextItem "$MNU_HELP", "h", "HelpMenu" NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" + NativeTextItem "$MNU_ENDGAME", "e", "QuitToMenu" NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } ifgame(ShadowWarrior) @@ -419,6 +420,7 @@ ImageScroller "HelpMenu" } ifgame(blood) { + class "Blood.ImageScrollerMenu" // The duplication here is to integrate the alternating versions of HELP3 QAVAnimationItem "Help4.qav" QAVAnimationItem "Help5.qav" @@ -530,6 +532,7 @@ ImageScroller "CreditsMenu" } ifgame(blood) { + class "Blood.ImageScrollerMenu" QAVAnimationItem "Credits.qav" } ifgame(ShadowWarrior)