fn_close.sqf 577 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. Name: cTab_fnc_close
  3. Author(s):
  4. Gundy
  5. Description:
  6. Initiates the closing of currently open interface
  7. Parameters:
  8. No Parameters
  9. Returns:
  10. BOOLEAN - TRUE
  11. Example:
  12. [] call cTab_fnc_close;
  13. */
  14. private ["_displayName","_display"];
  15. if !(isNil "cTabIfOpen") then {
  16. // [_ifType,_displayName,_player,_playerKilledEhId,_vehicle,_vehicleGetOutEhId]
  17. _displayName = cTabIfOpen select 1;
  18. _display = uiNamespace getVariable _displayName;
  19. _display closeDisplay 0;
  20. if !([_displayName] call cTab_fnc_isDialog) then {
  21. [] call cTab_fnc_onIfclose;
  22. };
  23. };
  24. true