#strict 2 #appendto MN7I static const Menu_Enum_Symbol = Menu_Layout_Symbol; static const Menu_Enum_InfoCaption = Menu_Layout_InfoCaption; static const Menu_Enum_Caption = Menu_Layout_Caption; static const Menu_Enum_Value = Menu_Layout_Value; global func Menu_SubMenu(caption, symbol, infoCaption, array menuEntries_Settings, int count, int extra, XPar1, XPar2) { if(GetType(caption) == C4V_Array) // caption contains all entry settings for the current menu and symbol contains all submenu entries and settings { return inherited(caption, symbol, infoCaption, menuEntries_Settings, count, extra, XPar1, XPar2, ...); } else { return inherited([Menu_Entry_Caption(caption), Menu_Entry_Symbol(symbol), Menu_Entry_Count(count), Menu_Entry_InfoCaption(infoCaption), Menu_Entry_Extra(extra), Menu_Entry_XPar1(XPar1), Menu_Entry_XPar2(XPar2)], menuEntries_Settings); } } global func Menu_Entry(caption, callback, symbol, count, infoCaption, args, extra, XPar1, XPar2) { if(GetType(caption) == C4V_String) { var settings = []; if(caption) { ArrayAppend(settings, Menu_Entry_Caption(caption)); } if(callback) { ArrayAppend(settings, Menu_Entry_Callbacks([callback])); ArrayAppend(settings, Menu_Entry_Args(args)); } if(symbol) { ArrayAppend(settings, Menu_Entry_Symbol(symbol)); } if(count) { ArrayAppend(settings, Menu_Entry_Count(count)); } if(infoCaption && infoCaption != "") { ArrayAppend(settings, Menu_Entry_InfoCaption(infoCaption)); } if(extra) { ArrayAppend(settings, Menu_Entry_Extra(extra)); } if(XPar1) { ArrayAppend(settings, XPar1); } if(XPar2) { ArrayAppend(settings, XPar2); } return inherited(settings); } else { return inherited(caption, callback, symbol, count, infoCaption, args, extra, XPar1, XPar2); } }