mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add vision mode to toolbar
This commit is contained in:
parent
1890bc1d59
commit
b6ff45e8bd
@ -127,11 +127,11 @@ class GVAR(interface) {
|
|||||||
idc = -1;
|
idc = -1;
|
||||||
style = 64;
|
style = 64;
|
||||||
};
|
};
|
||||||
class depthTool: viewTool {
|
class visionTool: viewTool {
|
||||||
idc = IDC_TOOL_DEPTH;
|
idc = IDC_TOOL_VISION;
|
||||||
x = safeZoneW - TOOL_W * 2 - MARGIN;
|
x = safeZoneW - TOOL_W * 2 - MARGIN;
|
||||||
};
|
};
|
||||||
class depthFrame: depthTool {
|
class visionFrame: visionTool {
|
||||||
idc = -1;
|
idc = -1;
|
||||||
style = 64;
|
style = 64;
|
||||||
};
|
};
|
||||||
|
@ -28,17 +28,17 @@ GVAR(camera) camCommit 0;
|
|||||||
// Reduce overhead when toolbar is hidden
|
// Reduce overhead when toolbar is hidden
|
||||||
if !(ctrlShown (_display displayCtrl IDC_TOOL)) exitWith {};
|
if !(ctrlShown (_display displayCtrl IDC_TOOL)) exitWith {};
|
||||||
|
|
||||||
private ["_name","_depth","_fov","_speed","_mode","_time","_toolbar"];
|
private ["_name","_vision","_fov","_speed","_mode","_time","_toolbar"];
|
||||||
_toolbar = _display displayCtrl IDC_TOOL;
|
_toolbar = _display displayCtrl IDC_TOOL;
|
||||||
|
|
||||||
// Find all tool values
|
// Find all tool values
|
||||||
if (GVAR(camMode) == 0) then {
|
if (GVAR(camMode) == 0) then {
|
||||||
_depth = format ["%1 m", floor(getPosASL GVAR(camera) select 2)];
|
_vision = if (GVAR(camVision) >= 0) then {localize LSTRING(VisionThermal)} else { [localize LSTRING(VisionNight), localize LSTRING(VisionNormal)] select (GVAR(camVision) < -1) };
|
||||||
_fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01];
|
_fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01];
|
||||||
_name = localize "STR_VOICE_MASK_NONE";
|
_name = localize "STR_VOICE_MASK_NONE";
|
||||||
_speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01];
|
_speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01];
|
||||||
} else {
|
} else {
|
||||||
_depth = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)];
|
_vision = format ["%1 m", floor(getPosASL GVAR(camUnit) select 2)];
|
||||||
_fov = WFSideText (group GVAR(camUnit));
|
_fov = WFSideText (group GVAR(camUnit));
|
||||||
_name = name GVAR(camUnit);
|
_name = name GVAR(camUnit);
|
||||||
_speed = format ["%1 km/h", floor(speed GVAR(camUnit)) max 0];
|
_speed = format ["%1 km/h", floor(speed GVAR(camUnit)) max 0];
|
||||||
@ -49,7 +49,7 @@ _time = [daytime,"HH:MM"] call BIS_fnc_timeToString;
|
|||||||
|
|
||||||
// Update the UI tools
|
// Update the UI tools
|
||||||
(_toolbar controlsGroupCtrl IDC_TOOL_CLOCK) ctrlSetText _time;
|
(_toolbar controlsGroupCtrl IDC_TOOL_CLOCK) ctrlSetText _time;
|
||||||
(_toolbar controlsGroupCtrl IDC_TOOL_DEPTH) ctrlSetText _depth;
|
(_toolbar controlsGroupCtrl IDC_TOOL_VISION) ctrlSetText _vision;
|
||||||
(_toolbar controlsGroupCtrl IDC_TOOL_FOV) ctrlSetText _fov;
|
(_toolbar controlsGroupCtrl IDC_TOOL_FOV) ctrlSetText _fov;
|
||||||
(_toolbar controlsGroupCtrl IDC_TOOL_NAME) ctrlSetText _name;
|
(_toolbar controlsGroupCtrl IDC_TOOL_NAME) ctrlSetText _name;
|
||||||
(_toolbar controlsGroupCtrl IDC_TOOL_SPEED) ctrlSetText _speed;
|
(_toolbar controlsGroupCtrl IDC_TOOL_SPEED) ctrlSetText _speed;
|
||||||
|
@ -40,11 +40,11 @@
|
|||||||
|
|
||||||
#define IDC_TOOL 3000
|
#define IDC_TOOL 3000
|
||||||
#define IDC_TOOL_CLOCK 3003
|
#define IDC_TOOL_CLOCK 3003
|
||||||
#define IDC_TOOL_DEPTH 3004
|
|
||||||
#define IDC_TOOL_FOV 3005
|
#define IDC_TOOL_FOV 3005
|
||||||
#define IDC_TOOL_NAME 3001
|
#define IDC_TOOL_NAME 3001
|
||||||
#define IDC_TOOL_SPEED 3006
|
#define IDC_TOOL_SPEED 3006
|
||||||
#define IDC_TOOL_VIEW 3002
|
#define IDC_TOOL_VIEW 3002
|
||||||
|
#define IDC_TOOL_VISION 3004
|
||||||
|
|
||||||
#define IDC_UNIT 6002
|
#define IDC_UNIT 6002
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
<English>Night vision</English>
|
<English>Night vision</English>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Spectator_visions_ti">
|
<Key ID="STR_ACE_Spectator_visions_ti">
|
||||||
<English>Thermal Imaging</English>
|
<English>Thermal imaging</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
|
||||||
<!-- Interface strings -->
|
<!-- Interface strings -->
|
||||||
@ -90,6 +90,15 @@
|
|||||||
<Key ID="STR_ACE_Spectator_ViewExternal">
|
<Key ID="STR_ACE_Spectator_ViewExternal">
|
||||||
<English>External</English>
|
<English>External</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Spectator_VisionNormal">
|
||||||
|
<English>Normal</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Spectator_VisionNight">
|
||||||
|
<English>Night</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Spectator_VisionThermal">
|
||||||
|
<English>Thermal</English>
|
||||||
|
</Key>
|
||||||
|
|
||||||
<!-- Keybinds -->
|
<!-- Keybinds -->
|
||||||
<Key ID="STR_ACE_Spectator_keyCamMoveForward">
|
<Key ID="STR_ACE_Spectator_keyCamMoveForward">
|
||||||
|
Loading…
Reference in New Issue
Block a user