mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
ReadThisMenu / MenuDelegate overriding.
This commit is contained in:
parent
047c0c9537
commit
58e66f4805
9 changed files with 21 additions and 1 deletions
|
@ -404,6 +404,8 @@ void FMapInfoParser::ParseGameInfo()
|
|||
GAMEINFOKEY_MUSIC(intermissionMusic, intermissionOrder, "intermissionMusic")
|
||||
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
||||
GAMEINFOKEY_STRING(MessageBoxClass, "MessageBoxClass")
|
||||
GAMEINFOKEY_STRING(HelpMenuClass, "HelpMenuClass")
|
||||
GAMEINFOKEY_STRING(MenuDelegateClass, "MenuDelegateClass")
|
||||
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
||||
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
||||
GAMEINFOKEY_BOOL(swapmenu, "swapmenu")
|
||||
|
|
|
@ -162,6 +162,8 @@ struct gameinfo_t
|
|||
FName althudclass;
|
||||
int statusbarclassfile = -1;
|
||||
FName MessageBoxClass;
|
||||
FName HelpMenuClass;
|
||||
FName MenuDelegateClass;
|
||||
FName backpacktype;
|
||||
FString intermissionMusic;
|
||||
int intermissionOrder;
|
||||
|
|
|
@ -202,6 +202,10 @@ bool M_SetSpecialMenu(FName& menu, int param)
|
|||
menu = NAME_Optionsmenu;
|
||||
break;
|
||||
|
||||
case NAME_Readthismenu:
|
||||
// [MK] allow us to override the ReadThisMenu class
|
||||
menu = gameinfo.HelpMenuClass;
|
||||
break;
|
||||
}
|
||||
|
||||
DMenuDescriptor** desc = MenuDescriptors.CheckKey(menu);
|
||||
|
@ -1300,7 +1304,7 @@ void SetDefaultMenuColors()
|
|||
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight);
|
||||
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection);
|
||||
|
||||
auto cls = PClass::FindClass("DoomMenuDelegate");
|
||||
auto cls = PClass::FindClass(gameinfo.MenuDelegateClass);
|
||||
menuDelegate = cls->CreateNew();
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ gameinfo
|
|||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
}
|
||||
|
|
|
@ -75,6 +75,8 @@ gameinfo
|
|||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ gameinfo
|
|||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
}
|
||||
|
|
|
@ -71,6 +71,8 @@ gameinfo
|
|||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
}
|
||||
|
|
|
@ -61,6 +61,8 @@ gameinfo
|
|||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_authorFont = "*SmallFont"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
}
|
||||
|
||||
gamedefaults
|
||||
|
|
|
@ -73,6 +73,8 @@ gameinfo
|
|||
statscreen_single = "RavenStatusScreen"
|
||||
statusbarclass = "StrifeStatusBar"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
helpmenuclass = "ReadThisMenu"
|
||||
menudelegateclass = "DoomMenuDelegate"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue