mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Make self interact_menu finally work on the map screen!!
This commit is contained in:
@ -1,10 +1,19 @@
|
|||||||
//XEH_clientInit.sqf
|
//XEH_clientInit.sqf
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_fnc = {
|
// Install the render EH on the main display
|
||||||
_this call FUNC(render);
|
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||||
|
|
||||||
|
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
||||||
|
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||||
|
[] spawn {
|
||||||
|
// Wait until the map display is detected
|
||||||
|
waitUntil {(!isNull findDisplay 12)};
|
||||||
|
|
||||||
|
// Install the render EH on the map screen
|
||||||
|
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)];
|
||||||
};
|
};
|
||||||
addMissionEventHandler ["Draw3D", _fnc];
|
|
||||||
|
|
||||||
["ACE3", QGVAR(InteractKey), "Interact Key",
|
["ACE3", QGVAR(InteractKey), "Interact Key",
|
||||||
{_this call FUNC(keyDown)},
|
{_this call FUNC(keyDown)},
|
||||||
|
@ -86,7 +86,10 @@ _actions = [
|
|||||||
"ACE_SelfActions",
|
"ACE_SelfActions",
|
||||||
"Self Actions",
|
"Self Actions",
|
||||||
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
|
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
|
||||||
{},
|
{
|
||||||
|
// Dummy statement so it's not collapsed when there's no available actions
|
||||||
|
true
|
||||||
|
},
|
||||||
{[ACE_player, objNull, ["isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)},
|
{[ACE_player, objNull, ["isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)},
|
||||||
{},
|
{},
|
||||||
[],
|
[],
|
||||||
|
@ -51,7 +51,7 @@ if (GVAR(keyDown) &&
|
|||||||
_sPos = if (count _pos != 2) then {
|
_sPos = if (count _pos != 2) then {
|
||||||
worldToScreen _pos
|
worldToScreen _pos
|
||||||
} else {
|
} else {
|
||||||
pos
|
_pos
|
||||||
};
|
};
|
||||||
if(count _sPos == 0) exitWith {false};
|
if(count _sPos == 0) exitWith {false};
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ _icon = _this select 6;
|
|||||||
//systemChat format ["Icon %1 - %2,%3,%4", _text, _pos select 0, _pos select 1, _pos select 2];
|
//systemChat format ["Icon %1 - %2,%3,%4", _text, _pos select 0, _pos select 1, _pos select 2];
|
||||||
|
|
||||||
if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
|
if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
|
||||||
_displayNum = [46,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
|
_displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
|
||||||
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
|
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
|
||||||
};
|
};
|
||||||
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
|
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
|
||||||
|
Reference in New Issue
Block a user