mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Made the Kestrel menu persistent
This commit is contained in:
parent
ddbf274c89
commit
a167336b40
@ -23,3 +23,5 @@ GVAR(ImpellerState) = 0;
|
|||||||
|
|
||||||
GVAR(Kestrel4500) = false;
|
GVAR(Kestrel4500) = false;
|
||||||
GVAR(Overlay) = false;
|
GVAR(Overlay) = false;
|
||||||
|
|
||||||
|
[] call FUNC(restoreUserData);
|
@ -9,10 +9,11 @@ PREP(createKestrelDialog);
|
|||||||
PREP(displayKestrel);
|
PREP(displayKestrel);
|
||||||
PREP(generateOutputData);
|
PREP(generateOutputData);
|
||||||
PREP(measureWindSpeed);
|
PREP(measureWindSpeed);
|
||||||
|
PREP(onCloseDialog);
|
||||||
|
PREP(onCloseDisplay);
|
||||||
|
PREP(restoreUserData);
|
||||||
|
PREP(storeUserData);
|
||||||
PREP(updateDisplay);
|
PREP(updateDisplay);
|
||||||
PREP(updateImpellerState);
|
PREP(updateImpellerState);
|
||||||
|
|
||||||
PREP(onCloseDialog);
|
|
||||||
PREP(onCloseDisplay);
|
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -51,3 +51,4 @@ switch (_this) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
[] call FUNC(updateDisplay);
|
[] call FUNC(updateDisplay);
|
||||||
|
[] call FUNC(storeUserData);
|
||||||
|
@ -42,9 +42,9 @@ if (GVAR(MinAvgMaxMode) == 1) then {
|
|||||||
|
|
||||||
// Wind SPD
|
// Wind SPD
|
||||||
_windSpeed = call FUNC(measureWindSpeed);
|
_windSpeed = call FUNC(measureWindSpeed);
|
||||||
GVAR(MIN) set [1, (GVAR(MIN) select 1) min abs(_windSpeed)];
|
GVAR(MIN) set [1, (GVAR(MIN) select 1) min _windSpeed];
|
||||||
GVAR(MAX) set [1, abs(_windSpeed) max (GVAR(MAX) select 1)];
|
GVAR(MAX) set [1, _windSpeed max (GVAR(MAX) select 1)];
|
||||||
GVAR(TOTAL) set [1, (GVAR(TOTAL) select 1) + abs(_windSpeed)];
|
GVAR(TOTAL) set [1, (GVAR(TOTAL) select 1) + _windSpeed];
|
||||||
|
|
||||||
// CROSSWIND
|
// CROSSWIND
|
||||||
_crosswind = 0;
|
_crosswind = 0;
|
||||||
|
18
addons/kestrel4500/functions/fnc_restoreUserData.sqf
Normal file
18
addons/kestrel4500/functions/fnc_restoreUserData.sqf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Reads user data from profileNamespace
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_kestrel4500_fnc_restore_user_data
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(Menu) = 0 max (profileNamespace getVariable ["ACE_Kestrel4500_menu", 0]) min ((count GVAR(Menus)) - 1);
|
18
addons/kestrel4500/functions/fnc_storeUserData.sqf
Normal file
18
addons/kestrel4500/functions/fnc_storeUserData.sqf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Saves user data into profileNamespace
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_kestrel4500_fnc_store_user_data
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
profileNamespace setVariable ["ACE_Kestrel4500_menu", GVAR(menu)];
|
Loading…
Reference in New Issue
Block a user