- validate the newly added menu customizations.

This commit is contained in:
Christoph Oelckers 2021-10-20 08:08:51 +02:00
parent ab3146054b
commit 2fc1481202

View file

@ -1304,7 +1304,17 @@ 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(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(); menuDelegate = cls->CreateNew();
} }