Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into repair

This commit is contained in:
commy2 2015-04-21 18:28:46 +02:00
commit 84566f9fe6
22 changed files with 1234 additions and 887 deletions

View File

@ -128,7 +128,7 @@ class ATragMX_RscListBox {
class ATragMX_RscListNBox: ATragMX_RscListBox {
idc=-1;
type=102;
columns[]={0.0, 0.225, 0.475, 0.725};
columns[]={0.0, 0.225, 0.475, 0.7};
drawSideArrows=0;
idcLeft=-1;
idcRight=-1;
@ -523,9 +523,12 @@ class ATragMX_Display {
x=0.550*safezoneW+safezoneX+0.32;
text="Cur";
};
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscEdit {
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText {
idc=400;
w=0.07;
style=160;
sizeEx=0.025;
w=0.065;
h=0.032;
x=0.550*safezoneW+safezoneX+0.17;
y=0.265*safezoneH+safezoneY+0.50;
text="";
@ -537,7 +540,6 @@ class ATragMX_Display {
class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE {
idc=402;
x=0.550*safezoneW+safezoneX+0.323;
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
};
class TEXT_WINDAGE: TEXT_ELEVATION {
idc=41;
@ -555,7 +557,6 @@ class ATragMX_Display {
class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE {
idc=412;
x=0.550*safezoneW+safezoneX+0.323;
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
};
class TEXT_LEAD: TEXT_GUN {
idc=42;
@ -607,7 +608,7 @@ class ATragMX_Display {
w=0.03;
x=0.550*safezoneW+safezoneX+0.27;
text="4";
action="";
action=QUOTE(call FUNC(toggle_solution_setup));
};
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
idc=3000;
@ -1337,6 +1338,16 @@ class ATragMX_Display {
idc=140050;
y=0.265*safezoneH+safezoneY+0.480;
};
class TEXT_TARGET_DATA_TARGET_SPEED_DIRECTION: ATragMX_RscButton {
idc=140051;
colorBackground[]={0.15,0.21,0.23,0.3};
colorFocused[]={0.15,0.21,0.23,0.2};
w=0.0231;
x=0.550*safezoneW+safezoneX+0.305;
y=0.265*safezoneH+safezoneY+0.480;
text=">";
action=QUOTE(call FUNC(cycle_target_speed_direction));
};
class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE {
idc=14006;
y=0.265*safezoneH+safezoneY+0.520;
@ -1367,5 +1378,94 @@ class ATragMX_Display {
class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=14011;
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=15000;
style=64;
w=0.25;
h=0.07;
x=0.550*safezoneW+safezoneX+0.13;
y=0.265*safezoneH+safezoneY+0.32;
text="Show result in";
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1: TEXT_TARGET_A {
idc=15001;
w=0.04;
x=0.550*safezoneW+safezoneX+0.14;
y=0.265*safezoneH+safezoneY+0.35;
text="1";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 1; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_2: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
idc=15002;
x=0.550*safezoneW+safezoneX+0.18;
text="2";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 2; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_3: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
idc=15003;
x=0.550*safezoneW+safezoneX+0.22;
text="3";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 3; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_4: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
idc=15004;
x=0.550*safezoneW+safezoneX+0.26;
text="4";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 4; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_8: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
idc=15005;
x=0.550*safezoneW+safezoneX+0.30;
text="8";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 8; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_10: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
idc=15006;
x=0.550*safezoneW+safezoneX+0.34;
text="10";
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 10; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_CLICKS_PER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=15007;
style=64;
w=0.25;
h=0.07;
x=0.550*safezoneW+safezoneX+0.13;
y=0.265*safezoneH+safezoneY+0.42;
text="Clicks per";
};
class TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA: TEXT_TARGET_A {
idc=15008;
w=0.05;
x=0.550*safezoneW+safezoneX+0.15;
y=0.265*safezoneH+safezoneY+0.45;
text="TMOA";
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 0; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_CLICKS_PER_SMOA: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
idc=15009;
x=0.550*safezoneW+safezoneX+0.23;
text="SMOA";
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 1; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_CLICKS_PER_MILS: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
idc=15010;
x=0.550*safezoneW+safezoneX+0.31;
text="MILS";
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 2; call FUNC(update_solution_setup));
};
class TEXT_SOLUTION_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
idc=15011;
x=0.550*safezoneW+safezoneX+0.18;
y=0.265*safezoneH+safezoneY+0.55;
action=QUOTE(1 call FUNC(toggle_solution_setup));
};
class TEXT_SOLUTION_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
idc=15012;
x=0.550*safezoneW+safezoneX+0.26;
y=0.265*safezoneH+safezoneY+0.55;
action=QUOTE(0 call FUNC(toggle_solution_setup));
};
};
};

View File

@ -20,6 +20,7 @@ PREP(cycle_num_ticks_units);
PREP(cycle_range_card_columns);
PREP(cycle_scope_unit);
PREP(cycle_target_size_units);
PREP(cycle_target_speed_direction);
PREP(delete_gun);
PREP(init);
PREP(parse_input);
@ -34,6 +35,7 @@ PREP(show_gun_list);
PREP(show_main_page);
PREP(show_range_card);
PREP(show_range_card_setup);
PREP(show_solution_setup);
PREP(show_target_data);
PREP(show_target_range_assist);
PREP(show_target_speed_assist);
@ -46,6 +48,7 @@ PREP(toggle_gun_ammo_data);
PREP(toggle_gun_list);
PREP(toggle_range_card);
PREP(toggle_range_card_setup);
PREP(toggle_solution_setup);
PREP(toggle_target_data);
PREP(toggle_target_range_assist);
PREP(toggle_target_speed_assist);
@ -59,6 +62,7 @@ PREP(update_range_card);
PREP(update_relative_click_memory);
PREP(update_result);
PREP(update_scope_unit);
PREP(update_solution_setup);
PREP(update_target);
PREP(update_target_data);
PREP(update_target_selection);

View File

@ -36,6 +36,7 @@ profileNamespace setVariable ["ACE_ATragMX_windSpeed2", nil];
profileNamespace setVariable ["ACE_ATragMX_windDirection", nil];
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", nil];
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", nil];
profileNamespace setVariable ["ACE_ATragMX_targetSpeedDirection", nil];
profileNamespace setVariable ["ACE_ATragMX_targetRange", nil];
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", nil];

View File

@ -35,6 +35,7 @@ if (GVAR(showRangeCard)) then {
[] call FUNC(update_range_card);
};
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
GVAR(showSolutionSetup) call FUNC(show_solution_setup);
GVAR(showTargetData) call FUNC(show_target_data);
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);

View File

@ -18,6 +18,7 @@
[] call FUNC(parse_input);
GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits));
GVAR(workingMemory) set [6, GVAR(currentScopeUnit)];
[] call FUNC(update_scope_unit);
[] call FUNC(update_result);

View File

@ -0,0 +1,22 @@
/*
* Author: Ruthberg
* Cycles through the target directions left/right
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_cycle_target_direction
*
* Public: No
*/
#include "script_component.hpp"
if ((ctrlText 140051) == ">") then {
ctrlSetText [140051, "<"];
} else {
ctrlSetText [140051, ">"];
};

View File

@ -42,7 +42,9 @@ GVAR(currentGun) = 0;
GVAR(currentTarget) = 0;
GVAR(currentScopeUnit) = 0;
GVAR(currentScopeClickUnit) = 2;
GVAR(currentScopeClickUnitTemp) = 2;
GVAR(currentScopeClickNumber) = 10;
GVAR(currentScopeClickNumberTemp) = 10;
GVAR(atmosphereModeTBH) = true;
GVAR(altitude) = 0;
@ -57,6 +59,7 @@ GVAR(windSpeed2) = [0, 0, 0, 0];
GVAR(windDirection) = [12, 12, 12, 12];
GVAR(inclinationAngle) = [0, 0, 0, 0];
GVAR(targetSpeed) = [0, 0, 0, 0];
GVAR(targetSpeedDirection) = [1, 1, 1, 1];
GVAR(targetRange) = [0, 0, 0, 0];
GVAR(showWind2) = false;
@ -74,6 +77,7 @@ GVAR(showGunAmmoData) = false;
GVAR(showGunList) = false;
GVAR(showRangeCard) = false;
GVAR(showRangeCardSetup) = false;
GVAR(showSolutionSetup) = false;
GVAR(showTargetData) = false;
GVAR(showTargetRangeAssist) = false;
GVAR(showTargetSpeedAssist) = false;

View File

@ -40,7 +40,12 @@ if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)
GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))];
};
};
GVAR(targetSpeed) set [GVAR(currentTarget), -50 max abs(parseNumber(ctrlText 140050)) min 50];
GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140050)) min 50];
if ((ctrlText 140051) == ">") then {
GVAR(targetSpeedDirection) set [GVAR(currentTarget), +1];
} else {
GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1];
};
GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140060)) min 4000];
if (GVAR(currentUnit) != 2) then {
GVAR(windSpeed1) set [GVAR(currentTarget), (GVAR(windSpeed1) select GVAR(currentTarget)) * 0.44704];
@ -90,9 +95,9 @@ if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])
GVAR(workingMemory) set [1, _muzzleVelocity];
GVAR(workingMemory) set [2, _zeroRange];
private ["_elevationCur", "_windageCur", "_elevationScopeStep", "_windageScopeStep"];
_elevationCur = parseNumber(ctrlText 402);
_windageCur = parseNumber(ctrlText 412);
private ["_elevationCur", "_windageCur", "_clickSize", "_clickNumber", "_clickInterval"];
_elevationCur = GVAR(workingMemory) select 10;
_windageCur = GVAR(workingMemory) select 11;
switch (GVAR(currentScopeUnit)) do {
case 0: {
@ -104,11 +109,16 @@ switch (GVAR(currentScopeUnit)) do {
_windageCur = _windageCur / 1.047;
};
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
switch (GVAR(workingMemory) select 7) do {
case 0: { _clickSize = 1; };
case 1: { _clickSize = 1 / 1.047; };
case 2: { _clickSize = 3.38; };
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;
_elevationCur = _elevationCur * _elevationScopeStep;
_windageCur = _windageCur * _windageScopeStep;
_elevationCur = Round(_elevationCur / _clickInterval);
_windageCur = Round(_windageCur / _clickInterval);
};
};

View File

@ -33,6 +33,7 @@ GVAR(windSpeed2) = profileNamespace getVariable ["ACE_ATragMX_windSpeed2", [0, 0
GVAR(windDirection) = profileNamespace getVariable ["ACE_ATragMX_windDirection", [12, 12, 12, 12]];
GVAR(inclinationAngle) = profileNamespace getVariable ["ACE_ATragMX_inclinationAngle", [0, 0, 0, 0]];
GVAR(targetSpeed) = profileNamespace getVariable ["ACE_ATragMX_targetSpeed", [0, 0, 0, 0]];
GVAR(targetSpeedDirection) = profileNamespace getVariable ["ACE_ATragMX_targetSpeedDirection", [1, 1, 1, 1]];
GVAR(targetRange) = profileNamespace getVariable ["ACE_ATragMX_targetRange", [0, 0, 0, 0]];
GVAR(rangeCardStartRange) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardStartRange", 200]) min 3000;

View File

@ -0,0 +1,20 @@
/*
* Author: Ruthberg
* Shows/Hides the solution setup controls
*
* Arguments:
* visible - <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* false call ace_atragmx_fnc_show_solution_setup
*
* Public: No
*/
#include "script_component.hpp"
GVAR(showSolutionSetup) = _this;
{ctrlShow [_x, _this]} forEach [15000, 15001, 15002, 15003, 15004, 15005, 15006, 15007, 15008, 15009, 15010, 15011, 15012];

View File

@ -17,7 +17,7 @@
GVAR(showTargetData) = _this;
{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011];
{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 140051, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011];
if (_this) then {
[] call FUNC(update_target_data);

View File

@ -35,6 +35,7 @@ profileNamespace setVariable ["ACE_ATragMX_windSpeed2", GVAR(windSpeed2)];
profileNamespace setVariable ["ACE_ATragMX_windDirection", GVAR(windDirection)];
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", GVAR(inclinationAngle)];
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", GVAR(targetSpeed)];
profileNamespace setVariable ["ACE_ATragMX_targetSpeedDirection", GVAR(targetSpeedDirection)];
profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)];
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", GVAR(rangeCardStartRange)];

View File

@ -0,0 +1,38 @@
/*
* Author: Ruthberg
* Toggles the solution setup screen on/off
*
* Arguments:
* Apply new data? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* 1 call ace_atragmx_fnc_toggle_solution_setup
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 15000) then {
false call FUNC(show_solution_setup);
true call FUNC(show_main_page);
if (_this == 1) then {
GVAR(currentScopeClickUnit) = GVAR(currentScopeClickUnitTemp);
GVAR(currentScopeClickNumber) = GVAR(currentScopeClickNumberTemp);
GVAR(workingMemory) set [7, GVAR(currentScopeClickUnit)];
GVAR(workingMemory) set [8, GVAR(currentScopeClickNumber)];
[] call FUNC(update_scope_unit);
[] call FUNC(update_result);
};
} else {
true call FUNC(show_solution_setup);
false call FUNC(show_main_page);
GVAR(currentScopeClickUnitTemp) = GVAR(currentScopeClickUnit);
GVAR(currentScopeClickNumberTemp) = GVAR(currentScopeClickNumber);
[] call FUNC(update_solution_setup);
};

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
private ["_range", "_elevation", "_windage1", "_windage2", "_elevationScopeStep", "_windageScopeStep", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
private ["_range", "_elevation", "_windage1", "_windage2", "_clickSize", "_clickNumber", "_clickInterval", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
_lastColumnOutput = "";
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
@ -54,12 +54,17 @@ lnbClear 5007;
_windage2 = _windage2 * 1.047;
};
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
switch (GVAR(workingMemory) select 7) do {
case 0: { _clickSize = 1; };
case 1: { _clickSize = 1 / 1.047; };
case 2: { _clickSize = 3.38; };
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;
_elevation = Round(_elevation / _elevationScopeStep);
_windage1 = Round(_windage1 / _windageScopeStep);
_windage2 = Round(_windage2 / _windageScopeStep);
_elevation = Round(_elevation / _clickInterval);
_windage1 = Round(_windage1 / _clickInterval);
_windage2 = Round(_windage2 / _clickInterval);
};
};

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"];
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_clickSize", "_clickNumber", "_clickInterval"];
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
@ -55,19 +55,24 @@ switch (GVAR(currentScopeUnit)) do {
_windageCur = _windageCur * 1.047;
};
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
switch (GVAR(workingMemory) select 7) do {
case 0: { _clickSize = 1; };
case 1: { _clickSize = 1 / 1.047; };
case 2: { _clickSize = 3.38; };
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;
_elevationAbs = Round(_elevationAbs / _elevationScopeStep);
_windageAbs = Round(_windageAbs / _windageScopeStep);
_elevationAbs = Round(_elevationAbs / _clickInterval);
_windageAbs = Round(_windageAbs / _clickInterval);
_wind2 = Round(_wind2 / _windageScopeStep);
_wind2 = Round(_wind2 / _clickInterval);
_elevationRel = Round(_elevationRel / _elevationScopeStep);
_windageRel = Round(_windageRel / _windageScopeStep);
_elevationRel = Round(_elevationRel / _clickInterval);
_windageRel = Round(_windageRel / _clickInterval);
_elevationCur = Round(_elevationCur / _elevationScopeStep);
_windageCur = Round(_windageCur / _windageScopeStep);
_elevationCur = Round(_elevationCur / _clickInterval);
_windageCur = Round(_windageCur / _clickInterval);
};
};
@ -77,16 +82,88 @@ if (GVAR(showWind2)) then {
ctrlSetText [42, "Lead"];
};
ctrlSetText [400, Str(Round(_elevationAbs * 100) / 100)];
ctrlSetText [401, Str(Round(_elevationRel * 100) / 100)];
ctrlSetText [402, Str(Round(_elevationCur * 100) / 100)];
_elevationAbs = Round(_elevationAbs * 100) / 100;
if (_elevationAbs > 0) then {
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
} else {
if (_elevationAbs < 0) then {
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
} else {
ctrlSetText [400, "0.0"];
};
};
_elevationRel = Round(_elevationRel * 100) / 100;
if (_elevationRel > 0) then {
ctrlSetText [401, format["%1", abs(_elevationRel)]];
} else {
if (_elevationRel < 0) then {
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
} else {
ctrlSetText [401, "0.0"];
};
};
_elevationCur = Round(_elevationCur * 100) / 100;
if (_elevationCur > 0) then {
ctrlSetText [402, format["%1", abs(_elevationCur)]];
} else {
if (_elevationCur < 0) then {
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
} else {
ctrlSetText [402, "0.0"];
};
};
ctrlSetText [410, Str(Round(_windageAbs * 100) / 100)];
ctrlSetText [411, Str(Round(_windageRel * 100) / 100)];
ctrlSetText [412, Str(Round(_windageCur * 100) / 100)];
_windageAbs = Round(_windageAbs * 100) / 100;
if (_windageAbs > 0) then {
ctrlSetText [410, format["%1R", abs(_windageAbs)]];
} else {
if (_windageAbs < 0) then {
ctrlSetText [410, format["%1L", abs(_windageAbs)]];
} else {
ctrlSetText [410, "0.0"];
};
};
_windageRel = Round(_windageRel * 100) / 100;
if (_windageRel > 0) then {
ctrlSetText [411, format["%1R", abs(_windageRel)]];
} else {
if (_windageRel < 0) then {
ctrlSetText [411, format["%1L", abs(_windageRel)]];
} else {
ctrlSetText [411, "0.0"];
};
};
_windageCur = Round(_windageCur * 100) / 100;
if (_windageCur > 0) then {
ctrlSetText [412, format["%1R", abs(_windageCur)]];
} else {
if (_windageCur < 0) then {
ctrlSetText [412, format["%1L", abs(_windageCur)]];
} else {
ctrlSetText [412, "0.0"];
};
};
if (GVAR(showWind2)) then {
ctrlSetText [420, Str(Round(_wind2 * 100) / 100)];
_wind2 = Round(_wind2 * 100) / 100;
if (_wind2 > 0) then {
ctrlSetText [420, format["%1R", abs(_wind2)]];
} else {
if (_wind2 < 0) then {
ctrlSetText [420, format["%1L", abs(_wind2)]];
} else {
ctrlSetText [420, "0.0"];
};
};
} else {
ctrlSetText [420, Str(Round(_lead * 100) / 100)];
_lead = Round(_lead * 100) / 100;
if (_lead > 0) then {
if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
ctrlSetText [420, format["%1R", abs(_lead)]];
} else {
ctrlSetText [420, format["%1L", abs(_lead)]];
};
} else {
ctrlSetText [420, "0.0"];
};
};

View File

@ -0,0 +1,31 @@
/*
* Author: Ruthberg
* Updates all solution setup input fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_solution_setup
*
* Public: No
*/
#include "script_component.hpp"
{((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [15001, 15002, 15003, 15004, 15005, 15006, 15008, 15009, 15010];
switch (GVAR(currentScopeClickNumberTemp)) do {
case 1: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15001) ctrlEnable false; };
case 2: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15002) ctrlEnable false; };
case 3: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15003) ctrlEnable false; };
case 4: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15004) ctrlEnable false; };
case 8: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15005) ctrlEnable false; };
case 10: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15006) ctrlEnable false; };
};
((uiNamespace getVariable "ATragMX_Display") displayCtrl (15008 + GVAR(currentScopeClickUnitTemp))) ctrlEnable false;
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15011);

View File

@ -32,6 +32,11 @@ if (GVAR(currentUnit) != 2) then {
} else {
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
};
if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
ctrlSetText [140051, ">"];
} else {
ctrlSetText [140051, "<"];
};
if (GVAR(currentUnit) == 1) then {
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
} else {

View File

@ -15,10 +15,7 @@
*/
#include "script_component.hpp"
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 501) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 502) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 503) ctrlEnable true;
{((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [500, 501, 502, 503];
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;

View File

@ -0,0 +1,27 @@
---
layout: wiki
title: Carry and Drag System
group: framework
order: 5
parent: wiki
---
# 1. Config Values
```
class CfgVehicles {
class MyVehicle {
ace_dragging_canDrag = 1; // can this object be dragged?; 1 yes, 0 no (0 default)
ace_dragging_dragPosition[] = {0,1.2,0} // Offset of the model from the body while dragging, comparable to the offset in attachTo (It's the same actually)
ace_dragging_dragDirection = 0; // how much degrees is the model rotatated after dragging it (a global setDir after attachTo)
ace_dragging_canCarry = 1; // can this object be carried?; 1 yes, 0 no (0 default)
ace_dragging_carryPosition[] = {0,1.2,0}; // Same as drag, but for carrying objects
ace_dragging_carryDirection = 0; // Same as drag, but for carrying objects
};
};
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because it is too large Load Diff