From 5527101322d1be9f62796e8a59b8c5de5dda0d0d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:00:22 +0200 Subject: Fixed gui scale working correctly when upgrading from an older config version --- src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java b/src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java index f63192cde..232faba8b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java +++ b/src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java @@ -56,14 +56,15 @@ public class Position { this.y = other.y; this.centerX = other.centerX; this.centerY = other.centerY; - this.scale = other.scale; + this.scale = other.getScale(); } public float getEffectiveScale() { - return Math.max(Math.min(scale * SkyHanniMod.getFeature().gui.globalScale, 10F), 0.1F); + return Math.max(Math.min(getScale() * SkyHanniMod.getFeature().gui.globalScale, 10F), 0.1F); } public float getScale() { + if (scale == 0) return 1f; return scale; } -- cgit