hide clock, use eventhandler

This commit is contained in:
commy2 2015-09-02 01:59:07 +02:00
parent 43c54d51e8
commit 29efc13556
2 changed files with 13 additions and 4 deletions

View File

@ -99,3 +99,14 @@ call FUNC(determineZoom);
}; };
}; };
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);
// hide clock on map if player has no watch
GVAR(hasWatch) = true;
["playerInventoryChanged", {
if (isNull (_this select 0)) exitWith {
GVAR(hasWatch) = true;
};
GVAR(hasWatch) = "ItemWatch" in (_this select 1 select 17);
}] call ace_common_fnc_addEventhandler

View File

@ -4,6 +4,4 @@
((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates); ((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);
// hide time when no map in inventory // hide time when no map in inventory
if (!isNull ACE_player) then { ((_this select 0) displayCtrl 101) ctrlShow GVAR(hasWatch);
((_this select 0) displayCtrl 101) ctrlShow ("ItemWatch" in assignedItems ACE_player);
};