Make self interact_menu finally work on the map screen!!

This commit is contained in:
Nicolás Badano 2015-03-23 18:26:20 -03:00
parent 75a09357aa
commit a432f74a6b
4 changed files with 18 additions and 6 deletions

View File

@ -1,10 +1,19 @@
//XEH_clientInit.sqf
#include "script_component.hpp"
_fnc = {
_this call FUNC(render);
// Install the render EH on the main display
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",
{_this call FUNC(keyDown)},

View File

@ -86,7 +86,10 @@ _actions = [
"ACE_SelfActions",
"Self Actions",
"\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)},
{},
[],

View File

@ -51,7 +51,7 @@ if (GVAR(keyDown) &&
_sPos = if (count _pos != 2) then {
worldToScreen _pos
} else {
pos
_pos
};
if(count _sPos == 0) exitWith {false};

View File

@ -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];
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)]);
};
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);