Skip to content

Commit

Permalink
Allow to Update Offsets for Registered Notification Displays
Browse files Browse the repository at this point in the history
  • Loading branch information
jokoho48 committed Sep 22, 2023
1 parent de09d13 commit fec7582
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addons/CLib/Notification/fn_registerDisplayNotification.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ params [
["_offsetHint", [0, 0]]
];

private _idx = GVAR(NotificationDisplays) pushBackUnique [_display, _offset, _offsetHint];

private _idx = GVAR(NotificationDisplays) findIf { (_x select 0) == _display };
if (_idx == -1) then {
_idx = GVAR(NotificationDisplays) pushBackUnique [_display, _offset, _offsetHint];
} else {
GVAR(NotificationDisplays) set [_idx, [_display, _offset, _offsetHint]];
};

private _deleted = false;
{
Expand Down

0 comments on commit fec7582

Please sign in to comment.