Hi all, I am trying to draw icons on the GPS panel. Currently having issues with it though, not sure where I am going wrong exactly. I have a feeling the control/IDC is wrong? The function (fn_playerIcons.sqf) works fine, it works on the normal map control #51. Code is quite messy, needs a cleanup/rewrite but for now just trying to get it working.
_miniMapKey = [];
{
_miniMapKey append _x;
} forEach
[
actionKeys "MiniMap",
actionKeys "MiniMapToggle",
actionKeys "ListLeftVehicleDisplay",
actionKeys "ListPrevLeftVehicleDisplay",
actionKeys "CloseLeftVehicleDisplay",
actionKeys "ListRightVehicleDisplay",
actionKeys "ListPrevRightVehicleDisplay",
actionKeys "CloseRightVehicleDisplay",
actionKeys "User20"
];
case (_key in _miniMapKey) :
{
systemChat "Mini Map Key Pressed";
_handled = false;
[] spawn
{
if !("ItemGPS" in assignedItems player) exitWith
{
systemChat "No GPS";
};
sleep 1.15;
waitUntil {visibleGPS};
sleep 1.15;
if (!visibleGPS) then
{
((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlRemoveEventHandler ["Draw", miniMapEH];
systemChat "GPS Not Visible";
miniMapEH = nil;
if (DEBUG_MODE isEqualTo 1) then
{
systemChat "[DEBUG] :: MINI MAP EH REMOVED";
};
} else
{
miniMapEH = ((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlAddEventHandler ["Draw", tky_fnc_playerIcons];
systemChat "GPS Visible";
if (DEBUG_MODE isEqualTo 1) then
{
systemChat "[DEBUG] :: MINI MAP EH ADDED";
};
};
};
};
Even tried all of these:
{
((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl _x) ctrlAddEventHandler ["Draw", tky_fnc_playerIcons];
} forEach
[
15110,
102,
15112,
199,
198,
197,
13301,
101
];
Any ideas?
Cheers,
Haz