fix a bug in notification positioning
Some checks failed
/ Build BaseBand DSM & Broadway (push) Has been cancelled

This commit is contained in:
Daniella / Tove 2024-06-18 17:42:02 +02:00
parent d7422420e0
commit 5058ffcdd4
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -238,7 +238,7 @@ public class HUD extends Feature {
for (int i = 0; i < renderFeatures.length; i++) {
Feature f = renderFeatures[i];
mc.fontRenderer.drawString(f.getHUDText(), 3, yl, getColor(f, i), textShadow);
yl = yl + mc.fontRenderer.FONT_HEIGHT;
yl += mc.fontRenderer.FONT_HEIGHT;
}
yl += 3;
@ -264,6 +264,8 @@ public class HUD extends Feature {
TextSplitter.drawString(infoString, x, yr, theme.getGreenColor(), textShadow, textMatchOrientation);
yr += TextSplitter.getStringHeight(infoString) + 3;
}
if(infoLoc == InfoLocation.BottomRight)
yr = 2;
renderNotifications(yl, yr);
}
@ -272,7 +274,7 @@ public class HUD extends Feature {
if(notificationRenderer == null)
return;
int y = nLocation == NotificationRender.NotificationLocation.Left ? yl : yr;
notificationRenderer.begin(infoLoc == InfoLocation.BottomRight ? 2 : y);
notificationRenderer.begin(y);
for (int i = notifs.size() - 1; i >= 0; i--) {
notificationRenderer.renderNotification(notifs.get(i));
}