mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Zeus - Toggle NVGs and Flashlights improvements (#6219)
* New Toggle NVG ui and improve function * Add Toggle Flashlights icon * New Toggle Flashlights ui and improve function * Stringtable changes and ace_ai postInit clean up * TRACE fix and stringtable capitalization
This commit is contained in:
parent
a828ebe591
commit
ec8115d2a4
@ -7,12 +7,13 @@
|
|||||||
{
|
{
|
||||||
if (_bool) then {
|
if (_bool) then {
|
||||||
_x enableAI _section;
|
_x enableAI _section;
|
||||||
|
LOG_3("%1 enableAI %2 | ID: %3",_x,_section,clientOwner);
|
||||||
} else {
|
} else {
|
||||||
_x disableAI _section;
|
_x disableAI _section;
|
||||||
|
LOG_3("%1 disableAI %2 | ID: %3",_x,_section,clientOwner);
|
||||||
};
|
};
|
||||||
LOG(format [ARR_4("XEH_postInit: %1 disableAI %2 | ID %3", _x, _section, clientOwner)]);
|
} forEach (_units select {local _x});
|
||||||
} foreach (_units select {local _x});
|
} forEach _sections;
|
||||||
} foreach _sections
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
|
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
|
||||||
@ -21,29 +22,26 @@
|
|||||||
params ["_unitsArray"];
|
params ["_unitsArray"];
|
||||||
{
|
{
|
||||||
_x params ["_unit", "_pos"];
|
_x params ["_unit", "_pos"];
|
||||||
//_unit doFollow leader _unit;
|
|
||||||
_unit setDestination [_pos, "LEADER PLANNED", true];
|
_unit setDestination [_pos, "LEADER PLANNED", true];
|
||||||
_unit doMove _pos;
|
_unit doMove _pos;
|
||||||
LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]);
|
LOG_3("%1 doMove %2 | ID: %3",_unit,_pos,clientOwner);
|
||||||
} foreach _unitsArray
|
} forEach _unitsArray;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(setBehaviour), {
|
[QGVAR(setBehaviour), {
|
||||||
params ["_groupsArray", "_behaviour"];
|
params ["_groupsArray", "_behaviour"];
|
||||||
{
|
{
|
||||||
_x params ["_group"];
|
_x setBehaviour _behaviour;
|
||||||
_group setBehaviour _behaviour;
|
LOG_3("%1 setBehaviour %2 | ID: %3",_x,_behaviour,clientOwner);
|
||||||
LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]);
|
} forEach _groupsArray;
|
||||||
} foreach _groupsArray
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(enableAttack), {
|
[QGVAR(enableAttack), {
|
||||||
params ["_unitsArray", "_mode"];
|
params ["_unitsArray", "_mode"];
|
||||||
{
|
{
|
||||||
_x params ["_unit"];
|
_x enableAttack _mode;
|
||||||
_unit enableAttack _mode;
|
LOG_3("%1 enableAttack %2 | ID: %3",_x,_mode,clientOwner);
|
||||||
LOG(format [ARR_4("XEH_postInit: %1 enableAttack %2 | ID %3", _unit, _mode, clientOwner)]);
|
} forEach _unitsArray;
|
||||||
} foreach _unitsArray
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(setUnitPos), {
|
[QGVAR(setUnitPos), {
|
||||||
@ -66,14 +64,18 @@
|
|||||||
_unit allowFleeing _cowardice;
|
_unit allowFleeing _cowardice;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
[QGVAR(enableGunLights), {
|
||||||
|
params ["_unit", "_mode"];
|
||||||
|
_unit enableGunLights _mode;
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
addMissionEventHandler ["Draw3D", {
|
addMissionEventHandler ["Draw3D", {
|
||||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_unit", "_pos"];
|
_x params ["_unit", "_pos"];
|
||||||
|
|
||||||
switch true do {
|
switch (true) do {
|
||||||
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||||
for "_i" from 0 to 3 do {
|
for "_i" from 0 to 3 do {
|
||||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
||||||
@ -102,6 +104,6 @@
|
|||||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} foreach _unitMoveList;
|
} forEach _unitMoveList;
|
||||||
}];
|
}];
|
||||||
#endif
|
#endif
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#define COMPONENT_BEAUTIFIED AI
|
#define COMPONENT_BEAUTIFIED AI
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
//#define DEBUG_MODE_FULL
|
// #define DEBUG_MODE_FULL
|
||||||
//#define DISABLE_COMPILE_CACHE
|
// #define DISABLE_COMPILE_CACHE
|
||||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_AI
|
#ifdef DEBUG_ENABLED_AI
|
||||||
|
@ -279,14 +279,15 @@ class CfgVehicles {
|
|||||||
class GVAR(moduleToggleNvg): GVAR(moduleBase) {
|
class GVAR(moduleToggleNvg): GVAR(moduleBase) {
|
||||||
curatorCanAttach = 1;
|
curatorCanAttach = 1;
|
||||||
category = QGVAR(AI);
|
category = QGVAR(AI);
|
||||||
displayName = CSTRING(moduleToggleNVG_DisplayName);
|
displayName = CSTRING(ModuleToggleNVG_DisplayName);
|
||||||
curatorInfoType = QGVAR(RscToggleNvg);
|
curatorInfoType = QGVAR(RscToggleNvg);
|
||||||
};
|
};
|
||||||
class GVAR(moduleToggleFlashlight): GVAR(moduleBase) {
|
class GVAR(moduleToggleFlashlight): GVAR(moduleBase) {
|
||||||
curatorCanAttach = 1;
|
curatorCanAttach = 1;
|
||||||
category = QGVAR(AI);
|
category = QGVAR(AI);
|
||||||
displayName = CSTRING(moduleToggleFlashlight_DisplayName);
|
displayName = CSTRING(ModuleToggleFlashlight_DisplayName);
|
||||||
curatorInfoType = QGVAR(RscToggleFlashlight);
|
curatorInfoType = QGVAR(RscToggleFlashlight);
|
||||||
|
icon = QPATHTOF(ui\Icon_Module_Zeus_Flashlight_ca.paa);
|
||||||
};
|
};
|
||||||
class GVAR(AddFullArsenal): GVAR(moduleBase) {
|
class GVAR(AddFullArsenal): GVAR(moduleBase) {
|
||||||
curatorCanAttach = 1;
|
curatorCanAttach = 1;
|
||||||
|
@ -16,10 +16,6 @@ QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill);
|
|||||||
[QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler;
|
[QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler;
|
[QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(suppressiveFire), LINKFUNC(moduleSuppressiveFireLocal)] call CBA_fnc_addEventHandler;
|
[QGVAR(suppressiveFire), LINKFUNC(moduleSuppressiveFireLocal)] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(enableFlashlight), {
|
|
||||||
params ["_unit", "_mode"];
|
|
||||||
_unit enableGunLights _mode;
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
|
||||||
|
|
||||||
// Editable object commands must be ran on server, this events are used in the respective module
|
// Editable object commands must be ran on server, this events are used in the respective module
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
|
@ -1,63 +1,64 @@
|
|||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe, mharis001
|
||||||
* Zeus module function to toggle Flashlights
|
* Zeus module function to toggle flashlights.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Logic object <OBJECT>
|
* 0: Logic object <OBJECT>
|
||||||
* 1: Toggle mode <BOOL>
|
* 1: Toggle mode <BOOL>
|
||||||
* 2: Add gear <BOOL>
|
* 2: Add gear <BOOL>
|
||||||
* 3: Target of the toggle <SCALAR> 0: blufor; 1: opfor; 2: indep; 3: civ; 4: selected group
|
* 3: Target units (-1 - Selected group, 0 - BLUFOR, 1 - OPFOR, 2 - Independent, 3 - Civilian) <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [LOGIC, true, true, 4] call ace_zeus_fnc_moduleToggleFlashlight
|
* [LOGIC, true, true, -1] call ace_zeus_fnc_moduleToggleFlashlight
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_logic", "_toggle", "_addGear", "_target"];
|
params ["_logic", "_toggle", "_addGear", "_target"];
|
||||||
|
TRACE_1("params",_this);
|
||||||
|
|
||||||
|
// Create array of target units
|
||||||
private _units = [];
|
private _units = [];
|
||||||
|
|
||||||
if (_target == 4) then {
|
if (_target == -1) then {
|
||||||
_units = units (attachedTo _logic);
|
_units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}};
|
||||||
} else {
|
} else {
|
||||||
_units = allUnits select {alive _x && {side _x == ([blufor, opfor, independent, civilian] select _target)}},
|
private _side = [west, east, independent, civilian] select _target;
|
||||||
|
_units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Toggle flashlights for units
|
||||||
if (_toggle) then {
|
if (_toggle) then {
|
||||||
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||||
{
|
{
|
||||||
// enableGunLights doesn't work on players
|
private _weapon = currentWeapon _x;
|
||||||
if !(isPlayer _x || {(currentWeapon _x) isEqualTo ""}) then {
|
private _pointer = (_x weaponAccessories _weapon) select 1;
|
||||||
private _pointer = (_x weaponAccessories (currentWeapon _x)) select 1;
|
|
||||||
|
|
||||||
if (!(_pointer isEqualTo "") && {isNull (configfile >> "CfgWeapons" >> _pointer >> "ItemInfo" >> "Pointer")}) then {
|
|
||||||
[QGVAR(enableFlashlight), [_x, "forceOn"], _x] call CBA_fnc_targetEvent;
|
|
||||||
|
|
||||||
|
if (!(_pointer isEqualTo "") && {getNumber (_cfgWeapons >> _pointer >> "ItemInfo" >> "FlashLight" >> "size") > 0}) then {
|
||||||
|
[QEGVAR(ai,enableGunLights), [_x, "forceOn"], _x] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
if (_addGear) then {
|
if (_addGear) then {
|
||||||
// Retrieve compatible items for the pointer slot
|
// Get compatible items for pointer slot
|
||||||
private _pointerSlotCompatible = [currentWeapon _x, "pointer"] call CBA_fnc_compatibleItems;
|
private _compatibleItems = [_weapon, "pointer"] call CBA_fnc_compatibleItems;
|
||||||
|
|
||||||
// Get flashlights from the array above and select the first one
|
// Get random flashlight from compatible pointer slot items
|
||||||
private _flashlight = (_pointerSlotCompatible select {isNull (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "Pointer")}) select 0;
|
private _flashlightItem = selectRandom (_compatibleItems select {getNumber (_cfgWeapons >> _x >> "ItemInfo" >> "FlashLight" >> "size") > 0});
|
||||||
|
|
||||||
[QEGVAR(common,addWeaponItem), [_x, (currentWeapon _x), _flashlight], _x] call CBA_fnc_targetEvent;
|
// Add flashlight to weapon and enable
|
||||||
[QGVAR(enableFlashlight), [_x, "forceOn"], _x] call CBA_fnc_targetEvent;
|
[QEGVAR(common,addWeaponItem), [_x, _weapon, _flashlightItem], _x] call CBA_fnc_targetEvent;
|
||||||
|
[QEGVAR(ai,enableGunLights), [_x, "forceOn"], _x] call CBA_fnc_targetEvent;
|
||||||
|
TRACE_2("Added flashlight to unit",_x,_flashlightItem);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
} forEach _units;
|
||||||
} foreach _units;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
if !(isPlayer _x || {(currentWeapon _x) isEqualTo ""}) then {
|
[QEGVAR(ai,enableGunLights), [_x, "forceOff"], _x] call CBA_fnc_targetEvent;
|
||||||
[QGVAR(enableFlashlight), [_x, "forceOff"], _x] call CBA_fnc_targetEvent;
|
} forEach _units;
|
||||||
};
|
|
||||||
} foreach _units;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
|
@ -1,68 +1,76 @@
|
|||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe, mharis001
|
||||||
* Zeus module function to toggle NVGs
|
* Zeus module function to toggle NVGs.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Logic object <OBJECT>
|
* 0: Logic object <OBJECT>
|
||||||
* 1: Toggle mode <BOOL>
|
* 1: Toggle mode <BOOL>
|
||||||
* 2: Target of the toggle <SCALAR> 0: blufor; 1: opfor; 2: indep; 3: civ; 4: selected group
|
* 2: Target units (-1 - Selected group, 0 - BLUFOR, 1 - OPFOR, 2 - Independent, 3 - Civilian) <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [LOGIC, true, 4] call ace_zeus_fnc_moduleToggleNvg
|
* [LOGIC, true, -1] call ace_zeus_fnc_moduleToggleNvg
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_logic", "_toggle", "_target"];
|
params ["_logic", "_toggle", "_target"];
|
||||||
|
TRACE_1("params",_this);
|
||||||
|
|
||||||
|
// Create array of target units
|
||||||
private _units = [];
|
private _units = [];
|
||||||
|
|
||||||
if (_target == 4) then {
|
if (_target == -1) then {
|
||||||
_units = units (attachedTo _logic);
|
_units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))}};
|
||||||
} else {
|
} else {
|
||||||
_units = allUnits select {alive _x && {side _x == ([blufor, opfor, independent, civilian] select _target)}},
|
private _side = [west, east, independent, civilian] select _target;
|
||||||
|
_units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Add or remove NVGs from units
|
||||||
|
private _cfgVehicles = configFile >> "CfgVehicles";
|
||||||
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||||
|
|
||||||
if (_toggle) then {
|
if (_toggle) then {
|
||||||
{
|
{
|
||||||
if (!isplayer _x && {hmd _x isEqualTo ""}) then {
|
if (hmd _x isEqualTo "") then {
|
||||||
private _cfgArray = getArray (configFile >> 'CfgVehicles' >> typeOf _x >>'linkedItems');
|
// Get NVG item and helmet from unit config
|
||||||
|
private _linkedItems = getArray (_cfgVehicles >> typeOf _x >> "linkedItems");
|
||||||
|
private _nvgItem = _linkedItems select {_x isKindOf ["NVGoggles", _cfgWeapons]};
|
||||||
|
private _nvgHelmet = _linkedItems select {!(getArray (_cfgWeapons >> _x >> "subItems") isEqualTo [])};
|
||||||
|
|
||||||
private _nvgClass = _cfgArray select {_x isKindOf ["NVGoggles",(configFile >> "CfgWeapons")]};
|
// Add NVG helmet if defined
|
||||||
private _nvgHelmet =_cfgArray select {count (getArray (configFile >> "CfgWeapons" >> _x >> "subItems")) > 0};
|
if !(_nvgHelmet isEqualTo []) exitWith {
|
||||||
|
|
||||||
// Can't have more than 1 assigned by default
|
|
||||||
if (count _nvgClass == 1 || {count _nvgHelmet == 1}) then {
|
|
||||||
if (count _nvgHelmet == 1) then {
|
|
||||||
_x addHeadgear (_nvgHelmet select 0);
|
_x addHeadgear (_nvgHelmet select 0);
|
||||||
} else {
|
|
||||||
_x linkItem (_nvgClass select 0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {
|
// Add NVGs if defined
|
||||||
|
if !(_nvgItem isEqualTo []) exitWith {
|
||||||
|
_x linkItem (_nvgItem select 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Default: add basic NVGs
|
||||||
_x linkItem "NVGoggles";
|
_x linkItem "NVGoggles";
|
||||||
};
|
};
|
||||||
};
|
} forEach _units;
|
||||||
} foreach _units;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
if (!isplayer _x) then {
|
// Get unit current NVGs or helmet with NVG built-in
|
||||||
private _cfgArray = getArray (configFile >> 'CfgVehicles' >> typeOf _x >>'linkedItems');
|
private _nvgItem = hmd _x;
|
||||||
|
private _nvgHelmet = getArray (_cfgWeapons >> headgear _x >> "subItems") isEqualTo [];
|
||||||
|
|
||||||
private _nvgHelmet =_cfgArray select {count (getArray (configFile >> "CfgWeapons" >> _x >> "subItems")) > 0};
|
// Remove NVG equipment from unit
|
||||||
|
if !(_nvgHelmet) then {
|
||||||
if (count _nvgHelmet == 1) then {
|
|
||||||
removeHeadgear _x;
|
removeHeadgear _x;
|
||||||
} else {
|
|
||||||
_x unlinkItem (hmd _x);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if !(_nvgItem isEqualTo "") then {
|
||||||
|
_x unlinkItem _nvgItem;
|
||||||
};
|
};
|
||||||
} foreach _units;
|
} forEach _units;
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe, mharis001
|
||||||
* Initalises the `Toggle Flashlights` zeus module display
|
* Initializes the "Toggle Flashlights" Zeus module display.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Flashlight toggle controls group <CONTROL>
|
* 0: toggleFlashlight controls group <CONTROL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* onSetFocus = "_this call ace_zeus_fnc_ui_toggleFLashlight"
|
* [CONTROL] call ace_zeus_fnc_ui_toggleFlashlight
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
disableSerialization;
|
#define COMBO_ITEMS [[LSTRING(SelectedGroup), "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"], ["STR_WEST", "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"], ["STR_EAST", "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"], ["STR_guerrila", "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"], ["STR_Civilian", "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"]]
|
||||||
|
|
||||||
params ["_control"];
|
params ["_control"];
|
||||||
|
|
||||||
//Generic Init:
|
// Generic init
|
||||||
private _display = ctrlparent _control;
|
private _display = ctrlParent _control;
|
||||||
private _ctrlButtonOK = _display displayctrl 1; //IDC_OK
|
private _ctrlButtonOK = _display displayCtrl 1; // IDC_OK
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
TRACE_1("logicObject",_logic);
|
TRACE_1("Logic Object",_logic);
|
||||||
|
|
||||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||||
|
|
||||||
|
// Validate module target
|
||||||
private _unit = effectiveCommander (attachedTo _logic);
|
private _unit = effectiveCommander (attachedTo _logic);
|
||||||
|
|
||||||
// Handles errors
|
|
||||||
scopeName "Main";
|
scopeName "Main";
|
||||||
private _fnc_errorAndClose = {
|
private _fnc_errorAndClose = {
|
||||||
params ["_msg"];
|
params ["_msg"];
|
||||||
@ -50,59 +50,24 @@ if !(isNull _unit) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//Specific on-load stuff:
|
// Specific onLoad stuff
|
||||||
private _comboBox = _display displayCtrl 56218;
|
private _combo = _display displayCtrl 56220;
|
||||||
private _comboBox2 = _display displayCtrl 56219;
|
|
||||||
private _comboBox3 = _display displayCtrl 56220;
|
|
||||||
|
|
||||||
|
// Add target combo options (only add selected group option if placed on unit)
|
||||||
{
|
{
|
||||||
_comboBox lbSetValue [_comboBox lbAdd (_x select 0), _x select 1];
|
_x params ["_text", "_icon"];
|
||||||
} forEach [
|
_combo lbSetPicture [_combo lbAdd (localize _text), _icon];
|
||||||
[localize ELSTRING(common,Disabled), 0],
|
} forEach (COMBO_ITEMS select [[0, 1] select (isNull _unit), 5]);
|
||||||
[localize ELSTRING(common,Enabled), 1]
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isNull _unit) then {
|
_combo lbSetCurSel 0;
|
||||||
{
|
|
||||||
_comboBox2 lbSetValue [_comboBox2 lbAdd (_x select 0), _x select 1];
|
// Set default flashlight status
|
||||||
} forEach [
|
if !(isNull _unit) then {
|
||||||
["BLUFOR", 0],
|
(_display displayCtrl 56218) lbSetCurSel ([0, 1] select (_unit isFlashlightOn (currentWeapon _unit)));
|
||||||
["OPFOR", 1],
|
|
||||||
["INDEP", 2],
|
|
||||||
["CIV", 3]
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
{
|
|
||||||
_comboBox2 lbSetValue [_comboBox2 lbAdd (_x select 0), _x select 1];
|
|
||||||
} forEach [
|
|
||||||
[localize LSTRING(moduleToggleNVG_SelectedGroup), 4],
|
|
||||||
["BLUFOR", 0],
|
|
||||||
["OPFOR", 1],
|
|
||||||
["INDEP", 2],
|
|
||||||
["CIV", 3]
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
|
||||||
_comboBox3 lbSetValue [_comboBox3 lbAdd (_x select 0), _x select 1];
|
|
||||||
} foreach [
|
|
||||||
[localize ELSTRING(common,Disabled), 0],
|
|
||||||
[localize ELSTRING(common,Enabled), 1]
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
private _enabledDefault = false;
|
|
||||||
if (!isNull _unit) then {
|
|
||||||
_enabledDefault = _unit isFlashlightOn (currentWeapon _unit);
|
|
||||||
};
|
|
||||||
_comboBox lbSetCurSel ([0,1] select _enabledDefault);
|
|
||||||
_comboBox2 lbSetCurSel 0;
|
|
||||||
_comboBox3 lbSetCurSel 0;
|
|
||||||
|
|
||||||
private _fnc_onUnload = {
|
private _fnc_onUnload = {
|
||||||
params ["_display"];
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
|
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
|
||||||
if (isNull _logic) exitWith {};
|
if (isNull _logic) exitWith {};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
@ -111,22 +76,20 @@ private _fnc_onUnload = {
|
|||||||
private _fnc_onConfirm = {
|
private _fnc_onConfirm = {
|
||||||
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
||||||
|
|
||||||
private _display = ctrlparent _ctrlButtonOK;
|
private _display = ctrlParent _ctrlButtonOK;
|
||||||
if (isNull _display) exitWith {};
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
if (isNull _logic) exitWith {};
|
if (isNull _logic) exitWith {};
|
||||||
|
|
||||||
private _combo1 = _display displayCtrl 56218;
|
private _toggle = lbCurSel (_display displayCtrl 56218) > 0;
|
||||||
private _combo2 = _display displayCtrl 56219;
|
private _addGear = lbCurSel (_display displayCtrl 56219) > 0;
|
||||||
private _combo3 = _display displayCtrl 56220;
|
private _combo = _display displayCtrl 56220;
|
||||||
|
private _target = lbCurSel _combo;
|
||||||
|
if (lbSize _combo > 4) then {DEC(_target)};
|
||||||
|
|
||||||
private _toggle = _combo1 lbValue (lbCurSel _combo1);
|
[_logic, _toggle, _addGear, _target] call FUNC(moduleToggleFlashlight);
|
||||||
private _target = _combo2 lbValue (lbCurSel _combo2);
|
|
||||||
private _gear = _combo3 lbValue (lbCurSel _combo3);
|
|
||||||
|
|
||||||
[_logic, _toggle == 1, _gear == 1, _target] call FUNC(moduleToggleFlashlight);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
_display displayAddEventHandler ["Unload", _fnc_onUnload];
|
||||||
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];
|
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm];
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
/*
|
/*
|
||||||
* Author: alganthe
|
* Author: alganthe, mharis001
|
||||||
* Initalises the `Toggle NVGs` zeus module display
|
* Initializes the "Toggle NVGs" Zeus module display.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Nvg toggle controls group <CONTROL>
|
* 0: toggleNvg controls group <CONTROL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* onSetFocus = "_this call ace_zeus_fnc_ui_toggleNvg"
|
* [CONTROL] call ace_zeus_fnc_ui_toggleNvg
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
disableSerialization;
|
#define COMBO_ITEMS [[LSTRING(SelectedGroup), "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"], ["STR_WEST", "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"], ["STR_EAST", "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"], ["STR_guerrila", "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"], ["STR_Civilian", "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"]]
|
||||||
|
|
||||||
params ["_control"];
|
params ["_control"];
|
||||||
|
|
||||||
//Generic Init:
|
// Generic init
|
||||||
private _display = ctrlparent _control;
|
private _display = ctrlParent _control;
|
||||||
private _ctrlButtonOK = _display displayctrl 1; //IDC_OK
|
private _ctrlButtonOK = _display displayCtrl 1; // IDC_OK
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
TRACE_1("logicObject",_logic);
|
TRACE_1("Logic Object",_logic);
|
||||||
|
|
||||||
_control ctrlRemoveAllEventHandlers "setFocus";
|
_control ctrlRemoveAllEventHandlers "SetFocus";
|
||||||
|
|
||||||
|
// Validate module target
|
||||||
private _unit = effectiveCommander (attachedTo _logic);
|
private _unit = effectiveCommander (attachedTo _logic);
|
||||||
|
|
||||||
// Handles errors
|
|
||||||
scopeName "Main";
|
scopeName "Main";
|
||||||
private _fnc_errorAndClose = {
|
private _fnc_errorAndClose = {
|
||||||
params ["_msg"];
|
params ["_msg"];
|
||||||
@ -50,50 +50,24 @@ if !(isNull _unit) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//Specific on-load stuff:
|
// Specific onLoad stuff
|
||||||
private _comboBox = _display displayCtrl 92855;
|
private _combo = _display displayCtrl 92856;
|
||||||
private _comboBox2 = _display displayCtrl 92856;
|
|
||||||
|
|
||||||
|
// Add target combo options (only add selected group option if placed on unit)
|
||||||
{
|
{
|
||||||
_comboBox lbSetValue [_comboBox lbAdd (_x select 0), _x select 1];
|
_x params ["_text", "_icon"];
|
||||||
} forEach [
|
_combo lbSetPicture [_combo lbAdd (localize _text), _icon];
|
||||||
[localize ELSTRING(common,Disabled), 0],
|
} forEach (COMBO_ITEMS select [[0, 1] select (isNull _unit), 5]);
|
||||||
[localize ELSTRING(common,Enabled), 1]
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isNull _unit) then {
|
_combo lbSetCurSel 0;
|
||||||
{
|
|
||||||
_comboBox2 lbSetValue [_comboBox2 lbAdd (_x select 0), _x select 1];
|
// Set default NVG status
|
||||||
} forEach [
|
if !(isNull _unit) then {
|
||||||
["BLUFOR", 0],
|
(_display displayCtrl 92855) lbSetCurSel ([0, 1] select !(hmd _unit isEqualTo ""));
|
||||||
["OPFOR", 1],
|
|
||||||
["INDEP", 2],
|
|
||||||
["CIV", 3]
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
{
|
|
||||||
_comboBox2 lbSetValue [_comboBox2 lbAdd (_x select 0), _x select 1];
|
|
||||||
} forEach [
|
|
||||||
[localize LSTRING(moduleToggleNVG_SelectedGroup), 4],
|
|
||||||
["BLUFOR", 0],
|
|
||||||
["OPFOR", 1],
|
|
||||||
["INDEP", 2],
|
|
||||||
["CIV", 3]
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private _enabledDefault = false;
|
|
||||||
if (!isNull _unit) then {
|
|
||||||
_enabledDefault = !(hmd _unit isEqualTo "");
|
|
||||||
};
|
|
||||||
_comboBox lbSetCurSel ([0,1] select _enabledDefault);
|
|
||||||
_comboBox2 lbSetCurSel 0;
|
|
||||||
|
|
||||||
private _fnc_onUnload = {
|
private _fnc_onUnload = {
|
||||||
params ["_display"];
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
|
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
|
||||||
if (isNull _logic) exitWith {};
|
if (isNull _logic) exitWith {};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
@ -102,20 +76,19 @@ private _fnc_onUnload = {
|
|||||||
private _fnc_onConfirm = {
|
private _fnc_onConfirm = {
|
||||||
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
params [["_ctrlButtonOK", controlNull, [controlNull]]];
|
||||||
|
|
||||||
private _display = ctrlparent _ctrlButtonOK;
|
private _display = ctrlParent _ctrlButtonOK;
|
||||||
if (isNull _display) exitWith {};
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull);
|
private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull);
|
||||||
if (isNull _logic) exitWith {};
|
if (isNull _logic) exitWith {};
|
||||||
|
|
||||||
private _combo1 = _display displayCtrl 92855;
|
private _toggle = lbCurSel (_display displayCtrl 92855) > 0;
|
||||||
private _combo2 = _display displayCtrl 92856;
|
private _combo = _display displayCtrl 92856;
|
||||||
|
private _target = lbCurSel _combo;
|
||||||
|
if (lbSize _combo > 4) then {DEC(_target)};
|
||||||
|
|
||||||
private _toggle = _combo1 lbValue (lbCurSel _combo1);
|
[_logic, _toggle, _target] call FUNC(moduleToggleNvg);
|
||||||
private _target = _combo2 lbValue (lbCurSel _combo2);
|
|
||||||
|
|
||||||
[_logic, _toggle == 1, _target] call FUNC(moduleToggleNvg);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_display displayAddEventHandler ["unload", _fnc_onUnload];
|
_display displayAddEventHandler ["Unload", _fnc_onUnload];
|
||||||
_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm];
|
_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm];
|
||||||
|
@ -1067,7 +1067,7 @@
|
|||||||
<Chinesesimp>装载到货物中</Chinesesimp>
|
<Chinesesimp>装载到货物中</Chinesesimp>
|
||||||
<Korean>화물 싣기</Korean>
|
<Korean>화물 싣기</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleNVG_DisplayName">
|
<Key ID="STR_ACE_Zeus_ModuleToggleNVG_DisplayName">
|
||||||
<English>Toggle NVGs</English>
|
<English>Toggle NVGs</English>
|
||||||
<German>Nachtsichtgeräte Hinzufügen/Entfernen</German>
|
<German>Nachtsichtgeräte Hinzufügen/Entfernen</German>
|
||||||
<French>Basculer JVN</French>
|
<French>Basculer JVN</French>
|
||||||
@ -1077,8 +1077,8 @@
|
|||||||
<Chinesesimp>切换夜视镜</Chinesesimp>
|
<Chinesesimp>切换夜视镜</Chinesesimp>
|
||||||
<Korean>야시경 토글</Korean>
|
<Korean>야시경 토글</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleNVG_ToggleNvgTitle">
|
<Key ID="STR_ACE_Zeus_ModuleToggleNVG_NvgEquipment">
|
||||||
<English>NVG equipment</English>
|
<English>NVG Equipment</English>
|
||||||
<German>Nachtsichtgeräte</German>
|
<German>Nachtsichtgeräte</German>
|
||||||
<French>Equipment de vision nocturne</French>
|
<French>Equipment de vision nocturne</French>
|
||||||
<Italian>Attrezzatura NVG</Italian>
|
<Italian>Attrezzatura NVG</Italian>
|
||||||
@ -1087,7 +1087,7 @@
|
|||||||
<Chinesesimp>夜视镜装备</Chinesesimp>
|
<Chinesesimp>夜视镜装备</Chinesesimp>
|
||||||
<Korean>야시경 장비</Korean>
|
<Korean>야시경 장비</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleNVG_ToggleNvgTitleTooltip">
|
<Key ID="STR_ACE_Zeus_ModuleToggleNVG_NvgEquipment_tooltip">
|
||||||
<English>Add or remove NVGs from units</English>
|
<English>Add or remove NVGs from units</English>
|
||||||
<German>Nachtsichtgeräte Hinzufügen/Entfernen</German>
|
<German>Nachtsichtgeräte Hinzufügen/Entfernen</German>
|
||||||
<French>Ajouter ou retirer JVN des unités</French>
|
<French>Ajouter ou retirer JVN des unités</French>
|
||||||
@ -1097,18 +1097,14 @@
|
|||||||
<Chinesesimp>增加或移除单位的夜视镜</Chinesesimp>
|
<Chinesesimp>增加或移除单位的夜视镜</Chinesesimp>
|
||||||
<Korean>야시경 추가/제거</Korean>
|
<Korean>야시경 추가/제거</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleNVG_ToggleNvgSide">
|
<Key ID="STR_ACE_Zeus_ToggleTarget">
|
||||||
<English>Toggle NVG target</English>
|
<English>Toggle Target</English>
|
||||||
<German>Wechsle Nachtsichtgeräteziel</German>
|
|
||||||
<French>Cible du basculement</French>
|
|
||||||
<Italian>Attiva obiettivo NVG</Italian>
|
|
||||||
<Japanese>選択先の暗視装置の切り替え</Japanese>
|
|
||||||
<Chinese>切換目標的夜視鏡狀態</Chinese>
|
|
||||||
<Chinesesimp>切换目标的夜视镜状态</Chinesesimp>
|
|
||||||
<Korean>목표의 야시경 토글</Korean>
|
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleNVG_SelectedGroup">
|
<Key ID="STR_ACE_Zeus_ToggleTarget_Tooltip">
|
||||||
<English>Selected group</English>
|
<English>Units affected by the toggle</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Zeus_SelectedGroup">
|
||||||
|
<English>Selected Group</English>
|
||||||
<German>Ausgewählte Gruppe</German>
|
<German>Ausgewählte Gruppe</German>
|
||||||
<French>Groupe sélectionné</French>
|
<French>Groupe sélectionné</French>
|
||||||
<Italian>Gruppo selezionato</Italian>
|
<Italian>Gruppo selezionato</Italian>
|
||||||
@ -1117,8 +1113,8 @@
|
|||||||
<Chinesesimp>选择小队</Chinesesimp>
|
<Chinesesimp>选择小队</Chinesesimp>
|
||||||
<Korean>그룹 선택</Korean>
|
<Korean>그룹 선택</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleFlashlight_DisplayName">
|
<Key ID="STR_ACE_Zeus_ModuleToggleFlashlight_DisplayName">
|
||||||
<English>Toggle flashlights</English>
|
<English>Toggle Flashlights</English>
|
||||||
<German>Ändere Taschenlampen</German>
|
<German>Ändere Taschenlampen</German>
|
||||||
<French>Basculer lampes torches</French>
|
<French>Basculer lampes torches</French>
|
||||||
<Italian>Attiva torce</Italian>
|
<Italian>Attiva torce</Italian>
|
||||||
@ -1127,18 +1123,8 @@
|
|||||||
<Chinesesimp>切换手电筒</Chinesesimp>
|
<Chinesesimp>切换手电筒</Chinesesimp>
|
||||||
<Korean>손전등 토글</Korean>
|
<Korean>손전등 토글</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleFlashlight_ToggleFlashlightSide">
|
<Key ID="STR_ACE_Zeus_ModuleToggleFlashlight_Flashlights">
|
||||||
<English>Toggle flashlight target</English>
|
<English>Flashlights</English>
|
||||||
<German>Wechsle Nachtsichtgeräteziel</German>
|
|
||||||
<French>Cible du basculement</French>
|
|
||||||
<Italian>Attiva obiettivo torcia</Italian>
|
|
||||||
<Japanese>選択先のフラッシュライトの切り替え</Japanese>
|
|
||||||
<Chinese>切換目標的手電筒狀態</Chinese>
|
|
||||||
<Chinesesimp>切换目标的手电筒状态</Chinesesimp>
|
|
||||||
<Korean>목표의 손전등 토글</Korean>
|
|
||||||
</Key>
|
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleFlashlight_ToggleFlashlightTitle">
|
|
||||||
<English>Flashlight</English>
|
|
||||||
<German>Taschenlampe</German>
|
<German>Taschenlampe</German>
|
||||||
<French>Lampe torche</French>
|
<French>Lampe torche</French>
|
||||||
<Italian>Torcia</Italian>
|
<Italian>Torcia</Italian>
|
||||||
@ -1147,8 +1133,8 @@
|
|||||||
<Chinesesimp>手电筒</Chinesesimp>
|
<Chinesesimp>手电筒</Chinesesimp>
|
||||||
<Korean>손전등</Korean>
|
<Korean>손전등</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Zeus_moduleToggleFlashlight_ToggleFlashlightGear">
|
<Key ID="STR_ACE_Zeus_ModuleToggleFlashlight_AddGear">
|
||||||
<English>Add gear</English>
|
<English>Add Gear</English>
|
||||||
<German>Ausrüstung hinzufügen</German>
|
<German>Ausrüstung hinzufügen</German>
|
||||||
<French>Ajouter équipement</French>
|
<French>Ajouter équipement</French>
|
||||||
<Italian>Aggiungi equipaggiamento</Italian>
|
<Italian>Aggiungi equipaggiamento</Italian>
|
||||||
|
BIN
addons/zeus/ui/Icon_Module_Zeus_Flashlight_ca.paa
Normal file
BIN
addons/zeus/ui/Icon_Module_Zeus_Flashlight_ca.paa
Normal file
Binary file not shown.
@ -583,42 +583,46 @@ class GVAR(RscToggleNvg): RscDisplayAttributes {
|
|||||||
class Title: Title {};
|
class Title: Title {};
|
||||||
class Content: Content {
|
class Content: Content {
|
||||||
class Controls {
|
class Controls {
|
||||||
class ToggleNvg: RscControlsGroupNoScrollbars {
|
class toggleNvg: RscControlsGroupNoScrollbars {
|
||||||
onSetFocus = QUOTE(_this call FUNC(ui_toggleNvg));
|
onSetFocus = QUOTE(_this call FUNC(ui_toggleNvg));
|
||||||
idc = 92854;
|
idc = 92854;
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
w = W_PART(26);
|
w = W_PART(26);
|
||||||
h = H_PART(3);
|
h = H_PART(2.1);
|
||||||
class controls {
|
class controls {
|
||||||
class ToggleNvgTitle: Title {
|
class ToggleLabel: RscText {
|
||||||
idc = -1;
|
idc = -1;
|
||||||
text = CSTRING(moduleToggleNVG_ToggleNvgTitle);
|
text = CSTRING(ModuleToggleNVG_NvgEquipment);
|
||||||
toolTip = CSTRING(moduleToggleNVG_ToggleNvgTitleTooltip);
|
tooltip = CSTRING(ModuleToggleNVG_NvgEquipment_tooltip);
|
||||||
x = H_PART(0);
|
x = 0;
|
||||||
y = H_PART(0);
|
y = 0;
|
||||||
w = W_PART(7);
|
w = W_PART(10);
|
||||||
|
h = H_PART(1);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
};
|
};
|
||||||
class ToggleNvgCombo: RscCombo {
|
class Toggle: ctrlToolbox {
|
||||||
idc = 92855;
|
idc = 92855;
|
||||||
x = H_PART(6);
|
x = W_PART(10.1);
|
||||||
y = H_PART(0);
|
y = 0;
|
||||||
w = W_PART(10.1);
|
w = W_PART(15.9);
|
||||||
h = H_PART(1);
|
h = H_PART(1);
|
||||||
|
rows = 1;
|
||||||
|
columns = 2;
|
||||||
|
strings[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled)};
|
||||||
};
|
};
|
||||||
class ToggleNvgSideTitle: Title {
|
class TargetLabel: ToggleLabel {
|
||||||
idc = -1;
|
text = CSTRING(ToggleTarget);
|
||||||
text = CSTRING(moduleToggleNVG_ToggleNvgSide);
|
tooltip = CSTRING(ToggleTarget_Tooltip);
|
||||||
x = H_PART(0);
|
y = H_PART(1.1);
|
||||||
y = H_PART(1.2);
|
|
||||||
w = W_PART(7);
|
|
||||||
};
|
};
|
||||||
class ToggleNvgSideCombo: RscCombo {
|
class Target: RscCombo {
|
||||||
idc = 92856;
|
idc = 92856;
|
||||||
x = H_PART(6);
|
x = W_PART(10.1);
|
||||||
y = H_PART(1.2);
|
y = H_PART(1.1);
|
||||||
w = W_PART(10.1);
|
w = W_PART(15.9);
|
||||||
h = H_PART(1);
|
h = H_PART(1);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.7};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -637,55 +641,54 @@ class GVAR(RscToggleFlashlight): RscDisplayAttributes {
|
|||||||
class Title: Title {};
|
class Title: Title {};
|
||||||
class Content: Content {
|
class Content: Content {
|
||||||
class Controls {
|
class Controls {
|
||||||
class ToggleFlashlight: RscControlsGroupNoScrollbars {
|
class toggleFlashlight: RscControlsGroupNoScrollbars {
|
||||||
onSetFocus = QUOTE(_this call FUNC(ui_toggleFlashlight));
|
onSetFocus = QUOTE(_this call FUNC(ui_toggleFlashlight));
|
||||||
idc = 56217;
|
idc = 56217;
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
w = W_PART(26);
|
w = W_PART(26);
|
||||||
h = H_PART(5);
|
h = H_PART(3.2);
|
||||||
class controls {
|
class controls {
|
||||||
class ToggleFlashlightTitle: Title {
|
class ToggleLabel: RscText {
|
||||||
idc = -1;
|
idc = -1;
|
||||||
text = CSTRING(moduleToggleFlashlight_ToggleFlashlightTitle);
|
text = CSTRING(ModuleToggleFlashlight_Flashlights);
|
||||||
x = H_PART(0);
|
x = 0;
|
||||||
y = H_PART(0);
|
y = 0;
|
||||||
w = W_PART(7);
|
w = W_PART(10);
|
||||||
|
h = H_PART(1);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
};
|
};
|
||||||
class ToggleFlashlightCombo: RscCombo {
|
class Toggle: ctrlToolbox {
|
||||||
idc = 56218;
|
idc = 56218;
|
||||||
x = H_PART(6);
|
x = W_PART(10.1);
|
||||||
y = H_PART(0);
|
y = 0;
|
||||||
w = W_PART(10.1);
|
w = W_PART(15.9);
|
||||||
h = H_PART(1);
|
h = H_PART(1);
|
||||||
|
rows = 1;
|
||||||
|
columns = 2;
|
||||||
|
strings[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled)};
|
||||||
};
|
};
|
||||||
class ToggleFlashlightSideTitle: Title {
|
class AddGearLabel: ToggleLabel {
|
||||||
idc = -1;
|
text = CSTRING(ModuleToggleFlashlight_AddGear);
|
||||||
text = CSTRING(moduleToggleFlashlight_ToggleFlashlightSide);
|
y = H_PART(1.1);
|
||||||
x = H_PART(0);
|
|
||||||
y = H_PART(1.2);
|
|
||||||
w = W_PART(7);
|
|
||||||
};
|
};
|
||||||
class ToggleFlashlightSideCombo: RscCombo {
|
class AddGear: Toggle {
|
||||||
idc = 56219;
|
idc = 56219;
|
||||||
x = H_PART(6);
|
y = H_PART(1.1);
|
||||||
y = H_PART(1.2);
|
strings[] = {ECSTRING(common,No), ECSTRING(common,Yes)};
|
||||||
w = W_PART(10.1);
|
|
||||||
h = H_PART(1);
|
|
||||||
};
|
};
|
||||||
class ToggleFlashlightGearTitle: Title {
|
class TargetLabel: ToggleLabel {
|
||||||
idc = -1;
|
text = CSTRING(ToggleTarget);
|
||||||
text = CSTRING(moduleToggleFlashlight_ToggleFlashlightGear);
|
tooltip = CSTRING(ToggleTarget_Tooltip);
|
||||||
x = H_PART(0);
|
y = H_PART(2.2);
|
||||||
y = H_PART(2.4);
|
|
||||||
w = W_PART(7);
|
|
||||||
};
|
};
|
||||||
class ToggleFlashlightGearCombo: RscCombo {
|
class Target: RscCombo {
|
||||||
idc = 56220;
|
idc = 56220;
|
||||||
x = H_PART(6);
|
x = W_PART(10.1);
|
||||||
y = H_PART(2.4);
|
y = H_PART(2.2);
|
||||||
w = W_PART(10.1);
|
w = W_PART(15.9);
|
||||||
h = H_PART(1);
|
h = H_PART(1);
|
||||||
|
colorBackground[] = {0, 0, 0, 0.7};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user