mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2623 from acemod/interactMenuSet
Interact menu settings after init
This commit is contained in:
commit
10950d5fab
@ -8,17 +8,19 @@ GVAR(cachedBuildingActionPairs) = [];
|
||||
|
||||
GVAR(ParsedTextCached) = [];
|
||||
|
||||
//Setup text/shadow/size/color settings matrix
|
||||
[] call FUNC(setupTextColors);
|
||||
["SettingChanged", {
|
||||
PARAMS_1(_name);
|
||||
if (_name in [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) then {
|
||||
params ["_name"];
|
||||
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
|
||||
[] call FUNC(setupTextColors);
|
||||
};
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
||||
// Install the render EH on the main display
|
||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
["SettingsInitialized", {
|
||||
//Setup text/shadow/size/color settings matrix
|
||||
[] call FUNC(setupTextColors);
|
||||
// Install the render EH on the main display
|
||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Add Actions to Houses:
|
||||
["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call EFUNC(common,addEventHandler);
|
||||
@ -54,7 +56,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
// If no menu is open just quit
|
||||
if (GVAR(openedMenuType) < 0) exitWith {};
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_isUnconscious);
|
||||
params ["_unit", "_isUnconscious"];
|
||||
|
||||
if (_unit != ACE_player || !_isUnconscious) exitWith {};
|
||||
|
||||
|
@ -14,13 +14,14 @@
|
||||
|
||||
BEGIN_COUNTER(fnc_render);
|
||||
|
||||
private ["_cursorPos1", "_cursorPos2", "_p1", "_p2", "_forEachIndex", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i", "_actionData", "_player", "_target"];
|
||||
_foundTarget = false;
|
||||
_cursorPos1 = positionCameraToWorld [0, 0, 0];
|
||||
_cursorPos2 = positionCameraToWorld [0, 0, 2];
|
||||
private ["_cursorPos2", "_p1", "_p2", "_forEachIndex", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i", "_actionData", "_player", "_target"];
|
||||
|
||||
_foundTarget = false;
|
||||
|
||||
if (GVAR(openedMenuType) >= 0) then {
|
||||
// _cursorPos1 = positionCameraToWorld [0, 0, 2];
|
||||
_cursorPos2 = positionCameraToWorld [0, 0, 2];
|
||||
|
||||
// Render all available nearby interactions
|
||||
call FUNC(renderActionPoints);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user