ZertyKchan 14 Posted March 12, 2014 Hello, I have been trying unsuccessfully to hook on the GPS minimap to use the DrawIcon function on it using the following code : 0 spawn { disableSerialization; _map2=controlNull; while {isNull _map2} do { _map2=findDisplay 133 displayctrl 101; hint format ["%1", _map2] ; sleep 1; }; hint format ["%1", _map2] ; _map2 ctrlAddEventHandler ["Draw", "_this call MAP_DrawItems;"]; }; This code is unsuccesfull in grabbing either the control or the display associated even when the GPS is openned and the dialog present in the uinamespace "IGUI_Displays" variable but works with the default map. Would someone with some experience in this type of code kindly help me resolve this issue? Thanks in advance. Share this post Link to post Share on other sites
ZertyKchan 14 Posted March 15, 2014 Ok, solved, if anyone is interested this is how I did it: 0 spawn { disableSerialization; _map2=controlNull; while {isNull _map2} do { {if !(isNil {_x displayctrl 101}) then {_map2= _x displayctrl 101};} count (uiNamespace getVariable "IGUI_Displays"); sleep 0.1; }; _map2 ctrlAddEventHandler ["Draw", "_this call MAP_DrawItems;"]; }; Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 2, 2014 This is directly related to something I'm working on, so thanks for the example. Did you encounter any issues with non unique IDC of 101? Share this post Link to post Share on other sites