ACE3/addons/safemode/functions/fnc_setSafeModeVisual.sqf

35 lines
853 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
2015-08-08 00:26:09 +00:00
/*
* Author: commy2
* Show firemode indicator, representing safety lock
*
* Arguments:
* 0: Show firemode <BOOL>
*
* Return Value:
* None
2015-08-08 00:26:09 +00:00
*
* Example:
* [true] call ace_safemode_fnc_setSafeModeVisual
*
* Public: No
*/
2015-08-08 00:26:09 +00:00
params ["_show"];
disableSerialization;
2015-01-17 20:32:34 +00:00
private _control = (uiNamespace getVariable ["ACE_dlgSoldier", displayNull]) displayCtrl 187;
if (isNull _control) exitWith {};
if (_show) then {
private _config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture";
2015-05-15 13:41:41 +00:00
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
_control ctrlCommit 0;
} else {
2015-05-15 13:41:41 +00:00
_control ctrlSetPosition [0, 0, 0, 0];
_control ctrlCommit 0;
};