mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
The previous GUI state is now restored when you open the ATragMX
This commit is contained in:
parent
d6cadb593a
commit
55d9f7a3da
@ -23,15 +23,19 @@ createDialog 'ATragMX_Display';
|
|||||||
|
|
||||||
call FUNC(update_target_selection);
|
call FUNC(update_target_selection);
|
||||||
|
|
||||||
true call FUNC(show_main_page);
|
GVAR(showMainPage) call FUNC(show_main_page);
|
||||||
|
|
||||||
false call FUNC(show_add_new_gun);
|
GVAR(showAddNewGun) call FUNC(show_add_new_gun);
|
||||||
false call FUNC(show_gun_list);
|
GVAR(showGunList) call FUNC(show_gun_list);
|
||||||
false call FUNC(show_range_card);
|
GVAR(showRangeCard) call FUNC(show_range_card);
|
||||||
false call FUNC(show_range_card_setup);
|
if (GVAR(showRangeCard)) then {
|
||||||
false call FUNC(show_target_range_assist);
|
ctrlSetFocus (_dsp displayCtrl 5001);
|
||||||
false call FUNC(show_target_speed_assist);
|
[] call FUNC(update_range_card);
|
||||||
false call FUNC(show_target_speed_assist_timer);
|
};
|
||||||
|
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
|
||||||
|
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
|
||||||
|
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
|
||||||
|
GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
|
||||||
|
|
||||||
{
|
{
|
||||||
lbAdd [6000, _x select 0];
|
lbAdd [6000, _x select 0];
|
||||||
|
@ -56,3 +56,13 @@ GVAR(windageOutput) = [0, 0, 0, 0];
|
|||||||
GVAR(leadOutput) = [0, 0, 0, 0];
|
GVAR(leadOutput) = [0, 0, 0, 0];
|
||||||
GVAR(tofOutput) = [0, 0, 0, 0];
|
GVAR(tofOutput) = [0, 0, 0, 0];
|
||||||
GVAR(velocityOutput) = [0, 0, 0, 0];
|
GVAR(velocityOutput) = [0, 0, 0, 0];
|
||||||
|
|
||||||
|
GVAR(showMainPage) = true;
|
||||||
|
GVAR(showAddNewGun) = false;
|
||||||
|
GVAR(showGunList) = false;
|
||||||
|
GVAR(showRangeCard) = false;
|
||||||
|
GVAR(showRangeCardSetup) = false;
|
||||||
|
GVAR(showTargetRangeAssist) = false;
|
||||||
|
GVAR(showTargetSpeedAssist) = false;
|
||||||
|
GVAR(showTargetSpeedAssistTimer) = false;
|
||||||
|
|
||||||
|
@ -15,4 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showAddNewGun) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [11000, 11001, 11002, 11003];
|
{ctrlShow [_x, _this]} forEach [11000, 11001, 11002, 11003];
|
@ -15,4 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showGunList) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007];
|
{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007];
|
||||||
|
|
||||||
|
if (_this) then {
|
||||||
|
ctrlSetFocus (_dsp displayCtrl 6002);
|
||||||
|
|
||||||
|
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
||||||
|
};
|
||||||
|
@ -15,5 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showMainPage) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
|
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 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, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
|
500, 501, 502, 503, 600, 601, 602, 603, 1000, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
|
||||||
|
@ -15,4 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showRangeCard) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007];
|
{ctrlShow [_x, _this]} forEach [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007];
|
||||||
|
@ -15,4 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showRangeCardSetup) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009];
|
{ctrlShow [_x, _this]} forEach [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009];
|
||||||
|
|
||||||
|
if (_this) then {
|
||||||
|
ctrlSetFocus (_dsp displayCtrl 10006);
|
||||||
|
|
||||||
|
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
|
||||||
|
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
|
||||||
|
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
|
||||||
|
};
|
||||||
|
@ -15,4 +15,21 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showTargetRangeAssist) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 7020];
|
{ctrlShow [_x, _this]} forEach [7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 7020];
|
||||||
|
|
||||||
|
if (_this) then {
|
||||||
|
ctrlSetFocus (_dsp displayCtrl 7018);
|
||||||
|
|
||||||
|
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
||||||
|
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
||||||
|
|
||||||
|
if (GVAR(currentUnit) != 2) then
|
||||||
|
{
|
||||||
|
ctrlSetText [7016, "Yards"];
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ctrlSetText [7016, "Meters"];
|
||||||
|
};
|
||||||
|
};
|
@ -15,4 +15,28 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showTargetSpeedAssist) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015];
|
{ctrlShow [_x, _this]} forEach [8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015];
|
||||||
|
|
||||||
|
if (_this) then {
|
||||||
|
ctrlSetFocus (_dsp displayCtrl 8012);
|
||||||
|
|
||||||
|
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||||
|
|
||||||
|
if (GVAR(currentUnit) != 2) then
|
||||||
|
{
|
||||||
|
ctrlSetText [8008, "Yards"];
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ctrlSetText [8008, "Meters"];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (GVAR(currentUnit) != 1) then
|
||||||
|
{
|
||||||
|
ctrlSetText [8011, "m/s"];
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ctrlSetText [8011, "mph"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -15,4 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(showTargetSpeedAssistTimer) = _this;
|
||||||
|
|
||||||
{ctrlShow [_x, _this]} forEach [9000, 9001, 9002];
|
{ctrlShow [_x, _this]} forEach [9000, 9001, 9002];
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if !(ctrlVisible 9000) then {
|
if !(ctrlVisible 9000) then {
|
||||||
|
|
||||||
false call FUNC(show_target_speed_assist);
|
false call FUNC(show_target_speed_assist);
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if (ctrlVisible 6000) then
|
if (ctrlVisible 6000) then
|
||||||
{
|
{
|
||||||
false call FUNC(show_gun_list);
|
false call FUNC(show_gun_list);
|
||||||
@ -29,8 +27,4 @@ if (ctrlVisible 6000) then
|
|||||||
{
|
{
|
||||||
false call FUNC(show_main_page);
|
false call FUNC(show_main_page);
|
||||||
true call FUNC(show_gun_list);
|
true call FUNC(show_gun_list);
|
||||||
|
|
||||||
ctrlSetFocus (_dsp displayCtrl 6002);
|
|
||||||
|
|
||||||
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if (ctrlVisible 5006) then
|
if (ctrlVisible 5006) then
|
||||||
{
|
{
|
||||||
false call FUNC(show_range_card);
|
false call FUNC(show_range_card);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Toggles the range card setup screen on/off
|
* Toggles the range card setup screen on/off
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* Nothing
|
* Apply new range card settings <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* Nothing
|
||||||
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if (ctrlVisible 10000) then
|
if (ctrlVisible 10000) then
|
||||||
{
|
{
|
||||||
false call FUNC(show_range_card_setup);
|
false call FUNC(show_range_card_setup);
|
||||||
@ -35,10 +33,4 @@ if (ctrlVisible 10000) then
|
|||||||
{
|
{
|
||||||
false call FUNC(show_range_card);
|
false call FUNC(show_range_card);
|
||||||
true call FUNC(show_range_card_setup);
|
true call FUNC(show_range_card_setup);
|
||||||
|
|
||||||
ctrlSetFocus (_dsp displayCtrl 10006);
|
|
||||||
|
|
||||||
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
|
|
||||||
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
|
|
||||||
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
|
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if (ctrlVisible 7000) then
|
if (ctrlVisible 7000) then
|
||||||
{
|
{
|
||||||
false call FUNC(show_target_range_assist);
|
false call FUNC(show_target_range_assist);
|
||||||
@ -31,17 +29,4 @@ if (ctrlVisible 7000) then
|
|||||||
{
|
{
|
||||||
false call FUNC(show_main_page);
|
false call FUNC(show_main_page);
|
||||||
true call FUNC(show_target_range_assist);
|
true call FUNC(show_target_range_assist);
|
||||||
|
|
||||||
ctrlSetFocus (_dsp displayCtrl 7018);
|
|
||||||
|
|
||||||
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
|
||||||
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
|
||||||
|
|
||||||
if (GVAR(currentUnit) != 2) then
|
|
||||||
{
|
|
||||||
ctrlSetText [7016, "Yards"];
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
ctrlSetText [7016, "Meters"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
if (ctrlVisible 8000) then
|
if (ctrlVisible 8000) then
|
||||||
{
|
{
|
||||||
false call FUNC(show_target_speed_assist);
|
false call FUNC(show_target_speed_assist);
|
||||||
@ -31,24 +29,4 @@ if (ctrlVisible 8000) then
|
|||||||
{
|
{
|
||||||
false call FUNC(show_main_page);
|
false call FUNC(show_main_page);
|
||||||
true call FUNC(show_target_speed_assist);
|
true call FUNC(show_target_speed_assist);
|
||||||
|
|
||||||
ctrlSetFocus (_dsp displayCtrl 8012);
|
|
||||||
|
|
||||||
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
|
||||||
|
|
||||||
if (GVAR(currentUnit) != 2) then
|
|
||||||
{
|
|
||||||
ctrlSetText [8008, "Yards"];
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
ctrlSetText [8008, "Meters"];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (GVAR(currentUnit) != 1) then
|
|
||||||
{
|
|
||||||
ctrlSetText [8011, "m/s"];
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
ctrlSetText [8011, "mph"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
(_dsp displayCtrl 500) ctrlEnable true;
|
(_dsp displayCtrl 500) ctrlEnable true;
|
||||||
(_dsp displayCtrl 501) ctrlEnable true;
|
(_dsp displayCtrl 501) ctrlEnable true;
|
||||||
(_dsp displayCtrl 502) ctrlEnable true;
|
(_dsp displayCtrl 502) ctrlEnable true;
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
|
||||||
|
|
||||||
(_dsp displayCtrl 600) ctrlEnable true;
|
(_dsp displayCtrl 600) ctrlEnable true;
|
||||||
(_dsp displayCtrl 601) ctrlEnable true;
|
(_dsp displayCtrl 601) ctrlEnable true;
|
||||||
(_dsp displayCtrl 602) ctrlEnable true;
|
(_dsp displayCtrl 602) ctrlEnable true;
|
||||||
|
@ -10,3 +10,5 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
|
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user