From 3d5dacf70f3d48efac40d73c433491f25c43c151 Mon Sep 17 00:00:00 2001 From: yugecin Date: Tue, 17 Jan 2017 16:22:06 +0100 Subject: [PATCH] add forgotten recalculations after changing resolution --- .../BubbleNotificationState.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/yugecin/opsudance/core/state/specialstates/BubbleNotificationState.java b/src/yugecin/opsudance/core/state/specialstates/BubbleNotificationState.java index 57f60584..4028dea1 100644 --- a/src/yugecin/opsudance/core/state/specialstates/BubbleNotificationState.java +++ b/src/yugecin/opsudance/core/state/specialstates/BubbleNotificationState.java @@ -103,6 +103,13 @@ public class BubbleNotificationState implements EventListener lines; - private boolean isFading; + private final String message; + private List lines; + + private boolean isFading; private int hoverTime; private Notification(String message, Color borderColor) { - this.lines = Fonts.wrap(Fonts.SMALLBOLD, message, (int) (width * 0.96f), true); - this.height = (int) (Fonts.SMALLBOLD.getLineHeight() * (lines.size() + 0.5f)); + this.message = message; + recalculateDimensions(); this.targetBorderColor = borderColor; this.borderColor = new Color(borderColor); this.textColor = new Color(Color.white); @@ -175,6 +184,11 @@ public class BubbleNotificationState implements EventListener