mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- allow menu items to inherit their parent's Init method for MENUDEFS.
This commit is contained in:
parent
68b47d81de
commit
6c9558459d
1 changed files with 2 additions and 2 deletions
|
@ -369,7 +369,7 @@ static void ParseListMenuBody(FScanner &sc, DListMenuDescriptor *desc)
|
||||||
PClass *cls = PClass::FindClass(buildname);
|
PClass *cls = PClass::FindClass(buildname);
|
||||||
if (cls != nullptr && cls->IsDescendantOf("ListMenuItem"))
|
if (cls != nullptr && cls->IsDescendantOf("ListMenuItem"))
|
||||||
{
|
{
|
||||||
auto func = dyn_cast<PFunction>(cls->Symbols.FindSymbol("Init", false));
|
auto func = dyn_cast<PFunction>(cls->Symbols.FindSymbol("Init", true));
|
||||||
if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method.
|
if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method.
|
||||||
{
|
{
|
||||||
auto &args = func->Variants[0].Proto->ArgumentTypes;
|
auto &args = func->Variants[0].Proto->ArgumentTypes;
|
||||||
|
@ -741,7 +741,7 @@ static void ParseOptionMenuBody(FScanner &sc, DOptionMenuDescriptor *desc)
|
||||||
PClass *cls = PClass::FindClass(buildname);
|
PClass *cls = PClass::FindClass(buildname);
|
||||||
if (cls != nullptr && cls->IsDescendantOf("OptionMenuItem"))
|
if (cls != nullptr && cls->IsDescendantOf("OptionMenuItem"))
|
||||||
{
|
{
|
||||||
auto func = dyn_cast<PFunction>(cls->Symbols.FindSymbol("Init", false));
|
auto func = dyn_cast<PFunction>(cls->Symbols.FindSymbol("Init", true));
|
||||||
if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method.
|
if (func != nullptr && !(func->Variants[0].Flags & (VARF_Protected | VARF_Private))) // skip internal classes which have a protexted init method.
|
||||||
{
|
{
|
||||||
auto &args = func->Variants[0].Proto->ArgumentTypes;
|
auto &args = func->Variants[0].Proto->ArgumentTypes;
|
||||||
|
|
Loading…
Reference in a new issue