diff --git a/addons/ui/CfgEventHandlers.hpp b/addons/ui/CfgEventHandlers.hpp index 423993f757..36c0fca8a3 100644 --- a/addons/ui/CfgEventHandlers.hpp +++ b/addons/ui/CfgEventHandlers.hpp @@ -1,3 +1,9 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/ui/XEH_PREP.hpp b/addons/ui/XEH_PREP.hpp new file mode 100644 index 0000000000..222afadf25 --- /dev/null +++ b/addons/ui/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(moduleInit); +PREP(moduleInitAdvanced); +PREP(setAdvancedElement); +PREP(setElements); diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf index 8a86e3ec32..a7feade1c3 100644 --- a/addons/ui/XEH_preInit.sqf +++ b/addons/ui/XEH_preInit.sqf @@ -2,9 +2,6 @@ ADDON = false; -PREP(moduleInit); -PREP(moduleInitAdvanced); -PREP(setAdvancedElement); -PREP(setElements); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/ui/XEH_preStart.sqf b/addons/ui/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/ui/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf index c87a79ffae..e5fc66d565 100644 --- a/addons/ui/functions/fnc_setAdvancedElement.sqf +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [show, 303, [188] ] call ace_ui_fnc_setAdvancedElement + * [show, 303, [188]] call ace_ui_fnc_setAdvancedElement * * Public: No */ @@ -29,7 +29,7 @@ _show = [1, 0] select _show; // Disable/Enable elements { - local _idc = _x; + private _idc = _x; // Loop through IGUI displays as they can be present several times for some reason { diff --git a/addons/ui/functions/fnc_setElements.sqf b/addons/ui/functions/fnc_setElements.sqf index 3952d8e337..1a9ca73399 100644 --- a/addons/ui/functions/fnc_setElements.sqf +++ b/addons/ui/functions/fnc_setElements.sqf @@ -9,17 +9,15 @@ * None * * Example: - * call ace_ui_fnc_setBasicElements + * [] call ace_ui_fnc_setElements * * Public: No */ #include "script_component.hpp" -//@todo - change to EFUNC(common,showHud) setter +private _shownHUD = shownHUD; // [hud, info, radar, compass, direction, menu, group, cursors] -local _shownHUD = shownHUD; // [hud, info, radar, compass, direction, menu, group, cursors] - -showHUD [ +["ui", [ _shownHUD select 0, GVAR(soldierVehicleWeaponInfo), GVAR(vehicleRadar), @@ -28,17 +26,4 @@ showHUD [ GVAR(commandMenu), GVAR(groupBar), _shownHUD select 7 -]; - -/* -["UIselective", [ - _shownHUD select 0, - _shownHUD select 1, - _shownHUD select 2, - _shownHUD select 3, - _shownHUD select 4, - GVAR(commandMenu), - _shownHUD select 6, - _shownHUD select 7 ]] call EFUNC(common,showHud); -*/