Modernize code

This commit is contained in:
jonpas 2016-03-06 12:50:16 +01:00
parent 0dc1e37874
commit a064c0c98d
6 changed files with 19 additions and 24 deletions

View File

@ -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));

4
addons/ui/XEH_PREP.hpp Normal file
View File

@ -0,0 +1,4 @@
PREP(moduleInit);
PREP(moduleInitAdvanced);
PREP(setAdvancedElement);
PREP(setElements);

View File

@ -2,9 +2,6 @@
ADDON = false;
PREP(moduleInit);
PREP(moduleInitAdvanced);
PREP(setAdvancedElement);
PREP(setElements);
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -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
{

View File

@ -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);
*/