ACE3/addons/ui/functions/fnc_setElements.sqf

38 lines
862 B
Plaintext
Raw Normal View History

2015-10-28 22:23:02 +00:00
/*
* Author: Jonpas
* Sets basic visible elements of the UI using showHUD setter.
*
* Arguments:
* 0: Force change even when disallowed <BOOL> (default: false)
2015-10-28 22:23:02 +00:00
*
* Return Value:
* None
*
* Example:
* [false] call ace_ui_fnc_setElements
2015-10-28 22:23:02 +00:00
*
* Public: No
*/
#include "script_component.hpp"
if (isArray (missionConfigFile >> "showHUD")) exitWith {};
params [ ["_force", false, [true]] ];
if (!_force && {!GVAR(allowSelectiveUI)}) exitWith {
[LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured)
};
2016-03-06 11:50:16 +00:00
private _shownHUD = shownHUD; // [hud, info, radar, compass, direction, menu, group, cursors]
2015-10-28 22:23:02 +00:00
2016-03-06 11:50:16 +00:00
["ui", [
2015-10-28 22:23:02 +00:00
_shownHUD select 0,
GVAR(soldierVehicleWeaponInfo),
GVAR(vehicleRadar),
GVAR(vehicleCompass),
_shownHUD select 4,
GVAR(commandMenu),
GVAR(groupBar),
_shownHUD select 7
]] call EFUNC(common,showHud);