fn_toggleMapTools.sqf 599 B

123456789101112131415161718192021222324252627
  1. /*
  2. Name: cTab_fnc_toggleMapTools
  3. Author(s):
  4. Gundy
  5. Description:
  6. Toggle drawing of map tools
  7. Parameters:
  8. 0: STRING - Name of uiNamespace variable for interface
  9. Returns:
  10. BOOLEAN - Draw map tools
  11. Example:
  12. cTabDrawMapTools = call cTab_fnc_toggleMapTools;
  13. */
  14. private ["_displayName","_currentMapTools","_newMapTools"];
  15. _displayName = _this select 0;
  16. _currentMapTools = [_displayName,"mapTools"] call cTab_fnc_getSettings;
  17. _newMapTools = if (_currentMapTools) then {false} else {true};
  18. [_displayName,[["mapTools",_newMapTools]]] call cTab_fnc_setSettings;
  19. _newMapTools