From c2d00a6cd85ac192f422d60580a8751de9bb8db2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 2 Mar 2019 10:07:08 +0100 Subject: [PATCH] fix undefined flexi menu variables --- addons/ui/CfgFunctions.hpp | 3 --- addons/ui/RscDisplayOptionsLayout.hpp | 12 ++++++------ addons/ui/XEH_preInit.sqf | 16 ++++++++++++++++ addons/ui/XEH_preStart.sqf | 12 +++++++----- 4 files changed, 29 insertions(+), 14 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; diff --git a/addons/ui/XEH_preStart.sqf b/addons/ui/XEH_preStart.sqf index 076187991..bf72edcfb 100644 --- a/addons/ui/XEH_preStart.sqf +++ b/addons/ui/XEH_preStart.sqf @@ -1,7 +1,9 @@ #include "script_component.hpp" -PREP(initDisplayInterrupt); -PREP(initDisplayMultiplayerSetup); -PREP(initDisplayOptionsLayout); -PREP(initDisplayPassword); -PREP(initDisplayRemoteMissions); +if (hasInterface) then { + PREP(initDisplayInterrupt); + PREP(initDisplayMultiplayerSetup); + PREP(initDisplayOptionsLayout); + PREP(initDisplayPassword); + PREP(initDisplayRemoteMissions); +};