From 2d9ffad8353981f18671d73bfb7546e8589e28ee Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 2 Mar 2019 15:53:43 +0100 Subject: [PATCH] fix undefined flexi menu variables (#1087) --- addons/ui/CfgFunctions.hpp | 3 --- addons/ui/RscDisplayOptionsLayout.hpp | 12 ++++++------ addons/ui/XEH_preInit.sqf | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/addons/ui/CfgFunctions.hpp b/addons/ui/CfgFunctions.hpp index 824f75248..1354ae310 100644 --- a/addons/ui/CfgFunctions.hpp +++ b/addons/ui/CfgFunctions.hpp @@ -19,9 +19,6 @@ class CfgFunctions { class flexiMenu_keyUp { file = QUOTE(PATHTOF(flexiMenu\fnc_keyUp.sqf)); }; - class menu { - file = QUOTE(PATHTOF(flexiMenu\fnc_menu.sqf)); - }; class flexiMenu_menu { file = QUOTE(PATHTOF(flexiMenu\fnc_menu.sqf)); }; diff --git a/addons/ui/RscDisplayOptionsLayout.hpp b/addons/ui/RscDisplayOptionsLayout.hpp index b4103c4dc..01d6726d5 100644 --- a/addons/ui/RscDisplayOptionsLayout.hpp +++ b/addons/ui/RscDisplayOptionsLayout.hpp @@ -4,12 +4,12 @@ class RscDisplayOptionsLayout { class Element021; class Element022: Element021 { idc = 12022; - onMouseEnter = "with uinamespace do {['mouseEnter',_this,''] call RscDisplayOptionsLayout_script;};"; - onMouseExit = "with uinamespace do {['mouseExit',_this,''] call RscDisplayOptionsLayout_script;};"; - onMouseHolding = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};"; - onMouseMoving = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};"; - onMouseButtonDown = "with uinamespace do {['mouseButtonDown',_this,''] call RscDisplayOptionsLayout_script;};"; - onMouseButtonUp = "with uinamespace do {['mouseButtonUp',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseEnter = "with uiNamespace do {['mouseEnter',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseExit = "with uiNamespace do {['mouseExit',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseHolding = "with uiNamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseMoving = "with uiNamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseButtonDown = "with uiNamespace do {['mouseButtonDown',_this,''] call RscDisplayOptionsLayout_script;};"; + onMouseButtonUp = "with uiNamespace do {['mouseButtonUp',_this,''] call RscDisplayOptionsLayout_script;};"; }; #define ADD_ELEMENT(var1) class Element##var1: Element022 {\ idc = __EVAL(12000 + var1);\ diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf index b2b0c6be3..9c1912e4e 100644 --- a/addons/ui/XEH_preInit.sqf +++ b/addons/ui/XEH_preInit.sqf @@ -30,3 +30,19 @@ if (hasInterface) then { }; }]; }; + +// legacy function names +FUNC(Add) = CBA_fnc_flexiMenu_Add; +FUNC(Remove) = CBA_fnc_flexiMenu_Remove; +FUNC(setObjectMenuSource) = CBA_fnc_flexiMenu_setObjectMenuSource; +FUNC(openMenuByDef) = CBA_fnc_flexiMenu_openMenuByDef; +FUNC(keyDown) = CBA_fnc_flexiMenu_keyDown; +FUNC(keyUp) = CBA_fnc_flexiMenu_keyUp; +FUNC(menu) = CBA_fnc_flexiMenu_menu; +FUNC(list) = CBA_fnc_flexiMenu_list; +FUNC(getMenuDef) = CBA_fnc_flexiMenu_getMenuDef; +FUNC(getMenuOption) = CBA_fnc_flexiMenu_getMenuOption; +FUNC(menuShortcut) = CBA_fnc_flexiMenu_menuShortcut; +FUNC(mouseButtonDown) = CBA_fnc_flexiMenu_mouseButtonDown; +FUNC(highlightCaretKey) = CBA_fnc_flexiMenu_highlightCaretKey; +FUNC(execute) = CBA_fnc_flexiMenu_execute;