Merge pull request #2430 from acemod/microDagr-customDrawEvents

microDagr - Add ability to access draw event for minimap
This commit is contained in:
PabstMirror 2015-09-14 23:36:07 -05:00
commit d6d64b58b0
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,9 @@
if (!hasInterface) exitWith {};
//Functions that are called for each draw of the map:
GVAR(miniMapDrawHandlers) = [];
//Add deviceKey entry:
private ["_conditonCode", "_toggleCode", "_closeCode"];
_conditonCode = {

View File

@ -48,6 +48,9 @@ if (GVAR(currentApplicationPage) == 1) then {
};
} else { //Map Mode:
//Call all added minimap draw event handlers:
{_this call _x;} forEach GVAR(miniMapDrawHandlers);
if (GVAR(mapAutoTrackPosition)) then {
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), (getPosASL ACE_player)];
ctrlMapAnimCommit _theMap;