aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
committersyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
commitd1c36c2412b98350f8336e38361e49b3655982d5 (patch)
tree34f2d6396f69840f623254b5c6e50c3563f5cfda /src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java
parent16a4367663f5ed2a909804de6d319c97c9854ecc (diff)
downloadSkyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.gz
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.bz2
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.zip
Too many changes to describe
Config gui overhaul.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java
index 4a1d30ee..169e99b5 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java
@@ -30,15 +30,16 @@ import java.awt.*;
public class MPanelScaledGUI extends MPanel {
@Getter
- private double scale = 1.0;
+ protected double scale = 1.0;
- private double relativeScale;
+ protected double relativeScale;
public void setScale(double scale) {
this.scale = scale;
for (MPanel childComponent : childComponents) {
childComponent.resize0((int) (getBounds().width/scale), (int) (getBounds().height/scale));
}
+ onBoundsUpdate();
}
@Override
@@ -84,6 +85,7 @@ public class MPanelScaledGUI extends MPanel {
GlStateManager.scale(this.scale, this.scale, 1);
clip = new Rectangle((int) (clip.x / scale), (int) (clip.y / scale), (int) (clip.width / scale), (int) (clip.height / scale));
+ lastAbsClip = clip;
this.relativeScale = parentScale * this.scale;
@@ -119,7 +121,7 @@ public class MPanelScaledGUI extends MPanel {
for (MPanel mPanel : getChildComponents()){
GlStateManager.pushMatrix();
GlStateManager.pushAttrib();
- mPanel.render0(scale, newPt,clip,absMousex, absMousey, relMousex, relMousey, partialTicks);
+ mPanel.render0(relativeScale, newPt,clip,absMousex, absMousey, relMousex, relMousey, partialTicks);
GlStateManager.popAttrib();
GlStateManager.popMatrix();
}