suggested changes and missed quote

This commit is contained in:
Brett 2019-06-11 23:11:02 -06:00 committed by Brett
parent cd6797894e
commit 899d2af590
7 changed files with 24 additions and 17 deletions

View File

@ -1,4 +1,5 @@
#include "\z\ace\addons\arsenal\script_component.hpp"
// make.py can't redefine already defined macros
#undef PREP
#define PREP(var) FUNC(var) = compileFinal preprocessFileLineNumbers format ["fnc_%1.sqf", QUOTE(var)]

View File

@ -32,7 +32,7 @@ class GVAR(alt): RscText {
colorText[] = {"(profileNamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profileNamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profileNamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profileNamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"};
text = "9999";
x = 6.3 * GUI_GRID_W + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_X", (safezoneX + 0.5 * GUI_GRID_W)]);
y = 2.3 * GUI_GRID_H + (profileNamespace getVariable [""IGUI_GRID_VEHICLE_Y"", (safezoneY + 0.5 * GUI_GRID_H)]);
y = 2.3 * GUI_GRID_H + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_Y", (safezoneY + 0.5 * GUI_GRID_H)]);
w = 2 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
sizeEx = 0.8 * GUI_GRID_H;

View File

@ -2,6 +2,6 @@
params ["_unit"];
if (_unit isEqualTo ALT_F) exitWith {["f", 0.3047999902464003]};
if (_unit isEqualTo ALT_F) exitWith {["f", METERS_TO_FEET]};
["m", 1]

View File

@ -5,18 +5,18 @@ params ["_ctrl"];
private _alt = (ctrlParent _ctrl) ctrlCreate [QGVAR(alt), -1];
private _units = (vehicle ACE_player) call FUNC(altUnits);
private _altInfo = _units call FUNC(altInfo);
_units call FUNC(altInfo) params ["_unitText", "_ratio"];
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
GVAR(altRatio) = _altInfo select 1;
((ctrlParent _alt) displayCtrl 1005) ctrlSetText _unitText;
GVAR(altRatio) = _ratio;
private _settingEH = ["CBA_SettingChanged", {
params ["_setting", "_value"];
_thisArgs params ["_settingName", "_alt"];
if (_setting isEqualTo _settingName) then {
private _altInfo = [_value] call FUNC(altInfo);
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
GVAR(altRatio) = _altInfo select 1;
[_value] call FUNC(altInfo) params ["_unitText", "_ratio"];
((ctrlParent _alt) displayCtrl 1005) ctrlSetText _unitText;
GVAR(altRatio) = _ratio;
};
}, [_units select 1, _alt]] call CBA_fnc_addEventHandlerArgs;

View File

@ -5,18 +5,18 @@ params ["_ctrl"];
private _speed = (ctrlParent _ctrl) ctrlCreate [QGVAR(speed), -1];
private _units = (vehicle ACE_player) call FUNC(speedUnits);
private _speedInfo = _units call FUNC(speedInfo);
_units call FUNC(speedInfo) params ["_unitText", "_ratio"];
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
GVAR(speedRatio) = _speedInfo select 1;
((ctrlParent _speed) displayCtrl 1004) ctrlSetText _unitText;
GVAR(speedRatio) = _ratio;
private _settingEH = ["CBA_SettingChanged", {
params ["_setting", "_value"];
_thisArgs params ["_settingName", "_speed"];
if (_setting isEqualTo _settingName) then {
private _speedInfo = [_value] call FUNC(speedInfo);
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
GVAR(speedRatio) = _speedInfo select 1;
[_value] call FUNC(speedInfo) params ["_unitText", "_ratio"];
((ctrlParent _speed) displayCtrl 1004) ctrlSetText _unitText;
GVAR(speedRatio) = _ratio;
};
}, [_units select 1, _speed]] call CBA_fnc_addEventHandlerArgs;

View File

@ -2,8 +2,8 @@
params ["_unit"];
if (_unit isEqualTo SPEED_MPH) exitWith {[LLSTRING(Speed_MPH), 1.609]};
if (_unit isEqualTo SPEED_KNOT) exitWith {[LLSTRING(Speed_KNOT), 1.852]};
if (_unit isEqualTo SPEED_MS) exitWith {[LLSTRING(Speed_MS), 3.6]};
if (_unit isEqualTo SPEED_MPH) exitWith {[LLSTRING(Speed_MPH), KMH_TO_MPH]};
if (_unit isEqualTo SPEED_KNOT) exitWith {[LLSTRING(Speed_KNOT), KMH_TO_KNOT]};
if (_unit isEqualTo SPEED_MS) exitWith {[LLSTRING(Speed_MS), KMH_TO_MS]};
[LLSTRING(Speed_KMH), 1]

View File

@ -16,9 +16,15 @@
#define SPEED_KNOT 2
#define SPEED_MS 3
#define KMH_TO_MPH 1.609
#define KMH_TO_KNOT 1.852
#define KMH_TO_MS 3.6
#define ALT_M 0
#define ALT_F 1
#define METERS_TO_FEET 0.3047999902464003
#define MODE_ATL 0
#define MODE_ASL 1