Overworked the scope click number GUI

This commit is contained in:
ulteq 2015-04-21 11:24:59 +02:00
parent 6c4b078dce
commit f98a0cdfae
5 changed files with 21 additions and 6 deletions

View File

@ -595,11 +595,20 @@ class ATragMX_Display {
class TEXT_SCOPE_UNIT: TEXT_GUN_LIST {
idc=2000;
style=ST_CENTER;
w=0.06;
x=0.550*safezoneW+safezoneX+0.205;
colorBackground[]={0,0,0,0};
text="TMOA";
action=QUOTE(call FUNC(cycle_scope_unit));
};
class TEXT_SCOPE_CLICK_NUMBER: TEXT_GUN_LIST {
idc=2001;
style=ST_CENTER;
w=0.03;
x=0.550*safezoneW+safezoneX+0.27;
text="4";
action="";
};
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
idc=3000;
style=ST_RIGHT;

View File

@ -18,7 +18,6 @@
GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2;
[(profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]), true, false] call FUNC(change_gun);
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 0]) min 3;
GVAR(currentScopeUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentScopeUnit", 0]) min 3;
GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereModeTBH", true];
GVAR(altitude) = -1000 max (profileNamespace getVariable ["ACE_ATragMX_altitude", 0]) min 20000;

View File

@ -18,7 +18,7 @@
GVAR(showMainPage) = _this;
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 23, 230, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
500, 501, 502, 503, 600, 601, 602, 603, 1000, 1001, 1002, 1003, 1004, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
500, 501, 502, 503, 600, 601, 602, 603, 1000, 1001, 1002, 1003, 1004, 2000, 2001, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
if (_this) then {
if (GVAR(atmosphereModeTBH)) then {
@ -26,4 +26,7 @@ if (_this) then {
} else {
{ctrlShow [_x, false]} forEach [21, 210, 22, 220];
};
if (GVAR(currentScopeUnit) != 3) then {
{ctrlShow [_x, false]} forEach [2001];
};
};

View File

@ -20,7 +20,6 @@ profileNamespace setVariable ["ACE_ATragMX_profileNamespaceVersion", ATRAGMX_PRO
profileNamespace setVariable ["ACE_ATragMX_currentUnit", GVAR(currentUnit)];
profileNamespace setVariable ["ACE_ATragMX_currentGun", GVAR(currentGun)];
profileNamespace setVariable ["ACE_ATragMX_currentTarget", GVAR(currentTarget)];
profileNamespace setVariable ["ACE_ATragMX_currentScopeUnit", GVAR(currentScopeUnit)];
profileNamespace setVariable ["ACE_ATragMX_atmosphereModeTBH", GVAR(atmosphereModeTBH)];
profileNamespace setVariable ["ACE_ATragMX_altitude", GVAR(altitude)];

View File

@ -15,10 +15,15 @@
*/
#include "script_component.hpp"
ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))];
if (GVAR(currentScopeUnit) == 3) then {
ctrlSetText [2000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
if (GVAR(showMainPage)) then {
ctrlShow [2001, true];
};
} else {
ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
ctrlSetText [5000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
};
ctrlShow [2001, false];
};