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:
@ -8,17 +8,19 @@ GVAR(cachedBuildingActionPairs) = [];
|
|||||||
|
|
||||||
GVAR(ParsedTextCached) = [];
|
GVAR(ParsedTextCached) = [];
|
||||||
|
|
||||||
//Setup text/shadow/size/color settings matrix
|
|
||||||
[] call FUNC(setupTextColors);
|
|
||||||
["SettingChanged", {
|
["SettingChanged", {
|
||||||
PARAMS_1(_name);
|
params ["_name"];
|
||||||
if (_name in [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) then {
|
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
|
||||||
[] call FUNC(setupTextColors);
|
[] call FUNC(setupTextColors);
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventhandler);
|
}] call EFUNC(common,addEventhandler);
|
||||||
|
|
||||||
// Install the render EH on the main display
|
["SettingsInitialized", {
|
||||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
//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:
|
//Add Actions to Houses:
|
||||||
["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call EFUNC(common,addEventHandler);
|
["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 no menu is open just quit
|
||||||
if (GVAR(openedMenuType) < 0) exitWith {};
|
if (GVAR(openedMenuType) < 0) exitWith {};
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_unit,_isUnconscious);
|
params ["_unit", "_isUnconscious"];
|
||||||
|
|
||||||
if (_unit != ACE_player || !_isUnconscious) exitWith {};
|
if (_unit != ACE_player || !_isUnconscious) exitWith {};
|
||||||
|
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
|
|
||||||
BEGIN_COUNTER(fnc_render);
|
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"];
|
private ["_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];
|
|
||||||
|
|
||||||
|
_foundTarget = false;
|
||||||
|
|
||||||
if (GVAR(openedMenuType) >= 0) then {
|
if (GVAR(openedMenuType) >= 0) then {
|
||||||
|
// _cursorPos1 = positionCameraToWorld [0, 0, 2];
|
||||||
|
_cursorPos2 = positionCameraToWorld [0, 0, 2];
|
||||||
|
|
||||||
// Render all available nearby interactions
|
// Render all available nearby interactions
|
||||||
call FUNC(renderActionPoints);
|
call FUNC(renderActionPoints);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user