Jacob Schmidt 72a6dbb90a Pass garage context through actor menu and update phone docs
- Thread garage object context into garage and vehicle garage launch paths
- Preserve nearby garage metadata in the UI and improve garage context resolution
- Add wallet and message/email examples to the player guide
2026-05-21 18:07:07 -05:00

45 lines
946 B
Plaintext

#include "..\script_component.hpp"
/*
* File: fnc_openUI.sqf
* Author: IDSolutions
* Date: 2025-12-16
* Last Update: 2026-01-30
* Public: No
*
* Description:
* Opens the garage UI.
*
* Arguments:
* None
*
* Return Value:
* UI opened [BOOL]
*
* Example:
* call forge_client_garage_fnc_openUI;
*/
params [["_garageObject", objNull, [objNull]]];
if (!isNull _garageObject) then {
GVAR(GarageContextService) call ["setActiveGarageObject", [_garageObject]];
};
private _display = createDialog ["RscGarage", true];
private _ctrl = _display displayCtrl 1006;
_ctrl ctrlAddEventHandler ["JSDialog", {
params ["_control", "_isConfirmDialog", "_message"];
[_control, _isConfirmDialog, _message] call FUNC(handleUIEvents);
}];
if !(isNil QGVAR(GarageUIBridge)) then {
GVAR(GarageUIBridge) call ["setActiveBrowserControl", [_ctrl]];
};
_ctrl ctrlWebBrowserAction ["LoadFile", QPATHTOF2(ui\_site\index.html)];
true;