forge/arma/client/addons/notifications/XEH_postInitClient.sqf
Jacob Schmidt 6eb6ac79d1 Revamp UI chrome and add notification sound alerts
- Add desktop-style title bar shell and viewport locking for bank/org UIs
- Redesign notification HUD visuals and behavior (timers, persistence, exposed JS API)
- Register and play a new notification sound via `CfgSounds` on client events
2026-03-09 20:59:02 -05:00

17 lines
602 B
Plaintext

#include "script_component.hpp"
[{
EGVAR(actor,ActorClass) get "isLoaded";
}, {
("NotificationHudLayer" call BFUNC(rscLayer)) cutRsc ["RscNotifications", "PLAIN"];
call FUNC(openUI);
if (isNil QGVAR(NotificationClass)) then { call FUNC(initNotificationClass); };
}] call CFUNC(waitUntilAndExecute);
[QGVAR(recieveNotification), {
params [["_type", "", [""]], ["_title", "", [""]], ["_content", "", [""]], ["_duration", 4000, [4000]]];
playSound QGVAR(notify);
GVAR(NotificationClass) call ["create", [_type, _title, _content, _duration]];
}] call CFUNC(addEventHandler);