Merge pull request #1664 from ada-tv/fix/vr-notification-height

Fix chat notification height on VR HUD
This commit is contained in:
ksuprynowicz 2025-07-05 16:37:14 +02:00 committed by GitHub
commit 5a919908e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ function notif(text, colour) {
text: '',
font: {size: sizeData[DEFAULT_SIZE].size},
x: 0,
y: Window.innerHeight,
y: Overlays.height(),
color: colour.text,
backgroundColor: colour.bg,
backgroundAlpha: noti.alpha.bg,
@ -148,14 +148,14 @@ function notif(text, colour) {
var ts = Overlays.textSize(noti.id, noti.text);
ts.height *= sizeData[DEFAULT_SIZE].heightMul;
ts.width *= sizeData[DEFAULT_SIZE].widthMul;
ts.y = Window.innerHeight - (sizeData[DEFAULT_SIZE].split * (notificationList.length)) - offset;
ts.y = Overlays.height() - (sizeData[DEFAULT_SIZE].split * (notificationList.length)) - offset;
ts.text = noti.text;
Overlays.editOverlay(noti.id, ts);
noti.update = function () {
var i = notificationList.length - findIndex(noti.id);
Overlays.editOverlay(noti.id, {
y: Window.innerHeight - (sizeData[DEFAULT_SIZE].split * (i)) - offset
y: Overlays.height() - (sizeData[DEFAULT_SIZE].split * (i)) - offset
});
};