ACE3/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf
ulteq 6578ff4559 *Replaced call compile preprocessFile with FUNC macro
*Removed some unused files
*Fixed incorrect .paa filepath
*Fixed incorrect profileNamespace access
2015-04-06 20:46:33 +02:00

30 lines
962 B
Plaintext

#include "script_component.hpp"
#define _dsp (uiNamespace getVariable "ATragMX_Display")
if (ctrlVisible 10000) then
{
false execVM "\atragmx\fnc_show_range_card_setup.sqf";
true execVM "\atragmx\fnc_show_range_card.sqf";
if (_this == 1) then
{
GVAR(ATragMX_rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000;
GVAR(ATragMX_rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000;
GVAR(ATragMX_rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000;
[] call FUNC(calculate_range_card);
[] call FUNC(update_range_card);
};
} else
{
false execVM "\atragmx\fnc_show_range_card.sqf";
true execVM "\atragmx\fnc_show_range_card_setup.sqf";
ctrlSetFocus (_dsp displayCtrl 10006);
ctrlSetText [10003, Str(Round(GVAR(ATragMX_rangeCardStartRange)))];
ctrlSetText [10004, Str(Round(GVAR(ATragMX_rangeCardEndRange)))];
ctrlSetText [10005, Str(Round(GVAR(ATragMX_rangeCardIncrement)))];
};