mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-18 02:01:18 +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_MUSIC(intermissionMusic, intermissionOrder, "intermissionMusic")
|
||||||
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
||||||
GAMEINFOKEY_STRING(MessageBoxClass, "MessageBoxClass")
|
GAMEINFOKEY_STRING(MessageBoxClass, "MessageBoxClass")
|
||||||
|
GAMEINFOKEY_STRING(HelpMenuClass, "HelpMenuClass")
|
||||||
|
GAMEINFOKEY_STRING(MenuDelegateClass, "MenuDelegateClass")
|
||||||
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
||||||
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
||||||
GAMEINFOKEY_BOOL(swapmenu, "swapmenu")
|
GAMEINFOKEY_BOOL(swapmenu, "swapmenu")
|
||||||
|
|
|
@ -162,6 +162,8 @@ struct gameinfo_t
|
||||||
FName althudclass;
|
FName althudclass;
|
||||||
int statusbarclassfile = -1;
|
int statusbarclassfile = -1;
|
||||||
FName MessageBoxClass;
|
FName MessageBoxClass;
|
||||||
|
FName HelpMenuClass;
|
||||||
|
FName MenuDelegateClass;
|
||||||
FName backpacktype;
|
FName backpacktype;
|
||||||
FString intermissionMusic;
|
FString intermissionMusic;
|
||||||
int intermissionOrder;
|
int intermissionOrder;
|
||||||
|
|
|
@ -202,6 +202,10 @@ bool M_SetSpecialMenu(FName& menu, int param)
|
||||||
menu = NAME_Optionsmenu;
|
menu = NAME_Optionsmenu;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Readthismenu:
|
||||||
|
// [MK] allow us to override the ReadThisMenu class
|
||||||
|
menu = gameinfo.HelpMenuClass;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DMenuDescriptor** desc = MenuDescriptors.CheckKey(menu);
|
DMenuDescriptor** desc = MenuDescriptors.CheckKey(menu);
|
||||||
|
@ -1300,7 +1304,7 @@ void SetDefaultMenuColors()
|
||||||
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight);
|
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight);
|
||||||
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection);
|
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection);
|
||||||
|
|
||||||
auto cls = PClass::FindClass("DoomMenuDelegate");
|
auto cls = PClass::FindClass(gameinfo.MenuDelegateClass);
|
||||||
menuDelegate = cls->CreateNew();
|
menuDelegate = cls->CreateNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,8 @@ gameinfo
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "DoomStatusScreen"
|
statscreen_single = "DoomStatusScreen"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
normforwardmove = 0x19, 0x32
|
normforwardmove = 0x19, 0x32
|
||||||
normsidemove = 0x18, 0x28
|
normsidemove = 0x18, 0x28
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,8 @@ gameinfo
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "DoomStatusScreen"
|
statscreen_single = "DoomStatusScreen"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
normforwardmove = 0x19, 0x32
|
normforwardmove = 0x19, 0x32
|
||||||
normsidemove = 0x18, 0x28
|
normsidemove = 0x18, 0x28
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,8 @@ gameinfo
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
normforwardmove = 0x19, 0x32
|
normforwardmove = 0x19, 0x32
|
||||||
normsidemove = 0x18, 0x28
|
normsidemove = 0x18, 0x28
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,8 @@ gameinfo
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
normforwardmove = 0x19, 0x32
|
normforwardmove = 0x19, 0x32
|
||||||
normsidemove = 0x18, 0x28
|
normsidemove = 0x18, 0x28
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,8 @@ gameinfo
|
||||||
statscreen_contentfont = "*BigFont"
|
statscreen_contentfont = "*BigFont"
|
||||||
statscreen_authorFont = "*SmallFont"
|
statscreen_authorFont = "*SmallFont"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
}
|
}
|
||||||
|
|
||||||
gamedefaults
|
gamedefaults
|
||||||
|
|
|
@ -73,6 +73,8 @@ gameinfo
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
statusbarclass = "StrifeStatusBar"
|
statusbarclass = "StrifeStatusBar"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
|
helpmenuclass = "ReadThisMenu"
|
||||||
|
menudelegateclass = "DoomMenuDelegate"
|
||||||
normforwardmove = 0x19, 0x32
|
normforwardmove = 0x19, 0x32
|
||||||
normsidemove = 0x18, 0x28
|
normsidemove = 0x18, 0x28
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue