- fixed: newly created list menus did not call their scripted virtual Init method.

This commit is contained in:
Christoph Oelckers 2017-02-18 01:31:01 +01:00
parent 5f1241a55c
commit 013e52fabd

View file

@ -630,7 +630,11 @@ void M_SetMenu(FName menu, int param)
if (cls == nullptr) cls = PClass::FindClass("ListMenu");
DListMenu *newmenu = (DListMenu *)cls->CreateNew();
newmenu->Init(DMenu::CurrentMenu, ld);
IFVIRTUALPTRNAME(newmenu, "OptionMenu", Init)
{
VMValue params[3] = { newmenu, DMenu::CurrentMenu, ld };
GlobalVMStack.Call(func, params, 3, nullptr, 0);
}
M_ActivateMenu(newmenu);
}
}