mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
- validate the newly added menu customizations.
This commit is contained in:
parent
ab3146054b
commit
2fc1481202
1 changed files with 11 additions and 1 deletions
|
@ -1304,7 +1304,17 @@ void SetDefaultMenuColors()
|
|||
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight);
|
||||
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection);
|
||||
|
||||
auto cls = PClass::FindClass(gameinfo.MenuDelegateClass);
|
||||
auto cls = PClass::FindClass(gameinfo.HelpMenuClass);
|
||||
if (!cls)
|
||||
I_FatalError("%s: Undefined help menu class", gameinfo.HelpMenuClass.GetChars());
|
||||
if (!cls->IsDescendantOf(RUNTIME_CLASS(DMenu)))
|
||||
I_FatalError("'%s' does not inherit from Menu", gameinfo.HelpMenuClass.GetChars());
|
||||
|
||||
cls = PClass::FindClass(gameinfo.MenuDelegateClass);
|
||||
if (!cls)
|
||||
I_FatalError("%s: Undefined menu delegate class", gameinfo.HelpMenuClass.GetChars());
|
||||
if (!cls->IsDescendantOf("MenuDelegateBase"))
|
||||
I_FatalError("'%s' does not inherit from MenuDelegateBase", gameinfo.MenuDelegateClass.GetChars());
|
||||
menuDelegate = cls->CreateNew();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue