more suggestions

This commit is contained in:
Brett 2019-06-09 02:19:54 -06:00 committed by Brett
parent 438941ff0e
commit cd6797894e
4 changed files with 21 additions and 18 deletions

View File

@ -3,11 +3,13 @@ class Extended_PreStart_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
class CfgPatches {
class ADDON {
@ -28,24 +29,24 @@ class RscInGameUI {
class GVAR(alt): RscText {
style = 1;
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])"};
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 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])";
y = "2.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_Y"", (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
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)]);
w = 2 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
sizeEx = 0.8 * GUI_GRID_H;
};
class GVAR(speed): RscText {
style = 1;
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])"};
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 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])";
y = "1.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_Y"", (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 6.3 * GUI_GRID_W + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_X", (safezoneX + 0.5 * GUI_GRID_W)]);
y = 1.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;
};
#include "CfgEventHandlers.hpp"

View File

@ -4,8 +4,8 @@ params ["_ctrl"];
private _alt = (ctrlParent _ctrl) ctrlCreate [QGVAR(alt), -1];
private _units = (vehicle ace_player) call FUNC(altUnits);
private _altInfo = [_units select 0] call FUNC(altInfo);
private _units = (vehicle ACE_player) call FUNC(altUnits);
private _altInfo = _units call FUNC(altInfo);
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
GVAR(altRatio) = _altInfo select 1;
@ -28,7 +28,7 @@ private _settingEH = ["CBA_SettingChanged", {
};
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0;
private _altValue = (((getPosATL vehicle ace_player) select 2) / GVAR(altRatio));
private _altValue = (((getPosATL vehicle ACE_player) select 2) / GVAR(altRatio));
if (_altValue < 10) then {
_altValue = _altValue toFixed 1;
} else {

View File

@ -4,8 +4,8 @@ params ["_ctrl"];
private _speed = (ctrlParent _ctrl) ctrlCreate [QGVAR(speed), -1];
private _units = (vehicle ace_player) call FUNC(speedUnits);
private _speedInfo = [_units select 0] call FUNC(speedInfo);
private _units = (vehicle ACE_player) call FUNC(speedUnits);
private _speedInfo = _units call FUNC(speedInfo);
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
GVAR(speedRatio) = _speedInfo select 1;
@ -28,5 +28,5 @@ private _settingEH = ["CBA_SettingChanged", {
};
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0;
_speed ctrlSetText ((speed vehicle ace_player / GVAR(speedRatio)) toFixed 0);
_speed ctrlSetText ((speed vehicle ACE_player / GVAR(speedRatio)) toFixed 0);
}, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;