#include "..\script_component.hpp" /* * Author: IDSolutions * Handles the UI events. * * Arguments: * None * * Return Value: * None * * Example: * [] call forge_client_actor_fnc_handleUIEvents; * * Public: No */ params ["_control", "_isConfirmDialog", "_message"]; private _alert = fromJSON _message; private _event = _alert get "event"; private _data = _alert get "data"; private _display = displayChild findDisplay 46; diag_log format ["[FORGE:Client:Actor] Handling UI event: %1 with data: %2", _event, _data]; switch (_event) do { case "actor::get::actions": { GVAR(ActorClass) call ["getNearbyActions", [_control]]; }; case "actor::open::atm": { [true] spawn EFUNC(bank,openUI); }; case "actor::open::bank": { [] spawn EFUNC(bank,openUI); }; case "actor::open::device": { hint "Device interaction is not yet implemented."; }; // TODO: Implement device interaction case "actor::open::garage": { hint "Garage interaction is not yet implemented."; }; // TODO: Implement garage interaction case "actor::open::vgarage": { [] spawn EFUNC(garage,openVG); }; case "actor::open::org": { [] spawn EFUNC(org,openUI); }; case "actor::open::locker": { hint "Locker interaction is not yet implemented."; }; // TODO: Implement locker interaction case "actor::open::vlocker": { ["Open", [false, FORGE_Locker_Box, player]] spawn BFUNC(arsenal) }; // case "actor::open::phone": { [] spawn EFUNC(phone,openUI) }; case "actor::open::phone": { hint "Phone interaction is not yet implemented."; }; // TODO: Implement phone interaction case "actor::open::iplayer": { hint "Player interaction is not yet implemented." }; // TODO: Implement player interaction case "actor::open::store": { hint "Store interaction is not yet implemented."; }; // TODO: Implement store interaction default { hint format ["Unhandled UI event: %1", _event]; }; }; if (_event isNotEqualTo "actor::get::actions") then { _display closeDisplay 1; }; true;