mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
more suggestions
This commit is contained in:
parent
438941ff0e
commit
cd6797894e
@ -3,11 +3,13 @@ class Extended_PreStart_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_PostInit_EventHandlers {
|
class Extended_PostInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
|
||||||
|
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
@ -28,24 +29,24 @@ class RscInGameUI {
|
|||||||
|
|
||||||
class GVAR(alt): RscText {
|
class GVAR(alt): RscText {
|
||||||
style = 1;
|
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";
|
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))])";
|
x = 6.3 * GUI_GRID_W + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_X", (safezoneX + 0.5 * GUI_GRID_W)]);
|
||||||
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))])";
|
y = 2.3 * GUI_GRID_H + (profileNamespace getVariable [""IGUI_GRID_VEHICLE_Y"", (safezoneY + 0.5 * GUI_GRID_H)]);
|
||||||
w = "2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = 2 * GUI_GRID_W;
|
||||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = 1 * GUI_GRID_H;
|
||||||
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
sizeEx = 0.8 * GUI_GRID_H;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GVAR(speed): RscText {
|
class GVAR(speed): RscText {
|
||||||
style = 1;
|
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";
|
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))])";
|
x = 6.3 * GUI_GRID_W + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_X", (safezoneX + 0.5 * GUI_GRID_W)]);
|
||||||
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))])";
|
y = 1.3 * GUI_GRID_H + (profileNamespace getVariable ["IGUI_GRID_VEHICLE_Y", (safezoneY + 0.5 * GUI_GRID_H)]);
|
||||||
w = "2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = 2 * GUI_GRID_W;
|
||||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = 1 * GUI_GRID_H;
|
||||||
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
sizeEx = 0.8 * GUI_GRID_H;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
@ -4,8 +4,8 @@ params ["_ctrl"];
|
|||||||
|
|
||||||
private _alt = (ctrlParent _ctrl) ctrlCreate [QGVAR(alt), -1];
|
private _alt = (ctrlParent _ctrl) ctrlCreate [QGVAR(alt), -1];
|
||||||
|
|
||||||
private _units = (vehicle ace_player) call FUNC(altUnits);
|
private _units = (vehicle ACE_player) call FUNC(altUnits);
|
||||||
private _altInfo = [_units select 0] call FUNC(altInfo);
|
private _altInfo = _units call FUNC(altInfo);
|
||||||
|
|
||||||
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
|
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
|
||||||
GVAR(altRatio) = _altInfo select 1;
|
GVAR(altRatio) = _altInfo select 1;
|
||||||
@ -28,7 +28,7 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
};
|
};
|
||||||
_ctrl ctrlSetFade 1;
|
_ctrl ctrlSetFade 1;
|
||||||
_ctrl ctrlCommit 0;
|
_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 {
|
if (_altValue < 10) then {
|
||||||
_altValue = _altValue toFixed 1;
|
_altValue = _altValue toFixed 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,8 +4,8 @@ params ["_ctrl"];
|
|||||||
|
|
||||||
private _speed = (ctrlParent _ctrl) ctrlCreate [QGVAR(speed), -1];
|
private _speed = (ctrlParent _ctrl) ctrlCreate [QGVAR(speed), -1];
|
||||||
|
|
||||||
private _units = (vehicle ace_player) call FUNC(speedUnits);
|
private _units = (vehicle ACE_player) call FUNC(speedUnits);
|
||||||
private _speedInfo = [_units select 0] call FUNC(speedInfo);
|
private _speedInfo = _units call FUNC(speedInfo);
|
||||||
|
|
||||||
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
|
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
|
||||||
GVAR(speedRatio) = _speedInfo select 1;
|
GVAR(speedRatio) = _speedInfo select 1;
|
||||||
@ -28,5 +28,5 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
};
|
};
|
||||||
_ctrl ctrlSetFade 1;
|
_ctrl ctrlSetFade 1;
|
||||||
_ctrl ctrlCommit 0;
|
_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;
|
}, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user