mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
6a25e9365a
* Refactor safemode * Further improvements and fixes * Update XEH_postInit.sqf * Don't allow binoculars to be set to safe * Add API for getting weapon safety status * Update fnc_jamWeapon.sqf * Added doc * Update fnc_playChangeFiremodeSound.sqf * Update addons/overheating/functions/fnc_jamWeapon.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update addons/weaponselect/functions/fnc_selectWeaponMode.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
35 lines
823 B
Plaintext
35 lines
823 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Shows firemode indicator, representing safety lock.
|
|
*
|
|
* Arguments:
|
|
* 0: Show firemode <BOOL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* true call ace_safemode_fnc_setSafeModeVisual
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_show"];
|
|
|
|
disableSerialization;
|
|
|
|
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";
|
|
|
|
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
|
|
} else {
|
|
_control ctrlSetPosition [0, 0, 0, 0];
|
|
};
|
|
|
|
_control ctrlCommit 0;
|