mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed: newly created list menus did not call their scripted virtual Init method.
This commit is contained in:
parent
5f1241a55c
commit
013e52fabd
1 changed files with 5 additions and 1 deletions
|
@ -630,7 +630,11 @@ void M_SetMenu(FName menu, int param)
|
||||||
if (cls == nullptr) cls = PClass::FindClass("ListMenu");
|
if (cls == nullptr) cls = PClass::FindClass("ListMenu");
|
||||||
|
|
||||||
DListMenu *newmenu = (DListMenu *)cls->CreateNew();
|
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);
|
M_ActivateMenu(newmenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue