ACE3/addons/atragmx/functions/fnc_toggle_option_menu.sqf
ulteq 3f4564605b ATragMX - Implemented missing features
* Muzzle Velocity vs. Temperature Interpolation
* C1 Ballistic Coefficient vs. Distance Interpolation
* Coriolis and Spin drift output
* Options menu
* Truing Drop
---------------------------------
* Overworked default gun profiles
---------------------------------
* Fixed the Cancel buttons on the gun-, atmosphere- and target columns.
* Fixed some muzzle velocity entries in the default gun list.
* Fixed divide by zero error in the target range estimator
2016-11-07 16:40:34 +01:00

52 lines
1.1 KiB
Plaintext

/*
* Author: Ruthberg
* Toggles the option menu on/off
*
* Arguments:
* open menu item <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* 1 call ace_atragmx_fnc_toggle_option_menu
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 3001) then {
if (_this) then {
private _optionID = lbCurSel 3002;
if (_optionID > 0) then {
ctrlShow [3001, false];
ctrlShow [3002, false];
[_optionID] call FUNC(evaluate_option_menu_input);
};
} else {
ctrlShow [3001, false];
ctrlShow [3002, false];
};
} else {
lbClear 3002;
lbAdd [3002, "Accuracy 1st"];
lbAdd [3002, "Muz Vel Table"];
lbAdd [3002, "Drag Coef Table"];
lbAdd [3002, "Target Speed Est"];
lbAdd [3002, "Target Range Est"];
lbAdd [3002, "Truing Drop"];
if (GVAR(showCoriolis)) then {
lbAdd [3002, "Show Coriolis *"];
} else {
lbAdd [3002, "Show Coriolis"];
};
lbAdd [3002, "Set Clicks"];
lbAdd [3002, "Gun Note"];
lbSetCurSel [3002, 0];
ctrlShow [3001, true];
ctrlShow [3002, true];
};