aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:00:22 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:00:22 +0200
commit5527101322d1be9f62796e8a59b8c5de5dda0d0d (patch)
tree0672a3eea339fa40cc0078265627df974966e82a /src/main/java/at/hannibal2
parentf5e2667e1ee0f8e663ae32f34f76e1a2bc0b6ada (diff)
downloadskyhanni-5527101322d1be9f62796e8a59b8c5de5dda0d0d.tar.gz
skyhanni-5527101322d1be9f62796e8a59b8c5de5dda0d0d.tar.bz2
skyhanni-5527101322d1be9f62796e8a59b8c5de5dda0d0d.zip
Fixed gui scale working correctly when upgrading from an older config version
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/core/config/Position.java5
1 files changed, 3 insertions, 2 deletions
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;
}