ACE3/addons/atragmx/functions/fnc_toggle_option_menu.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

54 lines
1.2 KiB
Plaintext

/*
* Author: Ruthberg
* Toggles the option menu on/off
*
* Arguments:
* open menu item <BOOL>
*
* Return Value:
* None
*
* 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];
ctrlSetFocus ((uiNamespace getVariable ["ATragMX_Display", displayNull]) displayCtrl 3002);
};