aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-01 14:24:06 +0900
committersyeyoung <cyong06@naver.com>2021-01-01 14:24:06 +0900
commitbe44a7665e4982934998020d3bb930be25a50c25 (patch)
tree62a8ba38bf5dccf98eec1876f1d3267bf161bca0 /src/main/java/kr/syeyoung/dungeonsguide/roomedit
parenta09e7553a93a177df7a6a3c7db5a1383b08a2416 (diff)
downloadSkyblock-Dungeons-Guide-be44a7665e4982934998020d3bb930be25a50c25.tar.gz
Skyblock-Dungeons-Guide-be44a7665e4982934998020d3bb930be25a50c25.tar.bz2
Skyblock-Dungeons-Guide-be44a7665e4982934998020d3bb930be25a50c25.zip
gui glitch fix and such
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java22
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java8
2 files changed, 16 insertions, 14 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java
index adf1bc09..2c1e1889 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java
@@ -48,10 +48,10 @@ public class MPanel {
public void setBounds(Rectangle bounds) {
if (bounds == null) return;
- this.bounds.x = getBounds().x;
- this.bounds.y = getBounds().y;
- this.bounds.width = getBounds().width;
- this.bounds.height = getBounds().height;
+ this.bounds.x = bounds.x;
+ this.bounds.y = bounds.y;
+ this.bounds.width = bounds.width;
+ this.bounds.height = bounds.height;
for (MPanel childComponent : childComponents) {
childComponent.resize0(getBounds().width, getBounds().height);
@@ -79,23 +79,23 @@ public class MPanel {
GL11.glTranslated(getBounds().x, getBounds().y, 0);
- Rectangle absBound = getBounds();
+ Rectangle absBound = getBounds().getBounds();
absBound.setLocation(absBound.x + parentPoint.x, absBound.y + parentPoint.y);
Rectangle clip = determineClip(parentClip, absBound);
lastAbsClip = clip;
clip(resolution, clip.x, clip.y, clip.width, clip.height);
- GL11.glPushAttrib(GL11.GL_SCISSOR_BIT);
+ GlStateManager.pushAttrib();
GL11.glEnable(GL11.GL_SCISSOR_TEST);
- GL11.glEnable(GL11.GL_BLEND);
- OpenGlHelper.glBlendFunc(770, 771, 1, 0);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-
+ GlStateManager.pushAttrib();
GuiScreen.drawRect(0,0, getBounds().width, getBounds().height, backgroundColor.getRGB());
+ GlStateManager.popAttrib();
GL11.glPushMatrix();
+ GlStateManager.pushAttrib();
render(absMousex, absMousey, relMousex, relMousey, partialTicks, clip);
+ GlStateManager.popAttrib();
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_SCISSOR_TEST);
@@ -106,7 +106,9 @@ public class MPanel {
for (MPanel mPanel : getChildComponents()){
GL11.glPushMatrix();
+ GlStateManager.pushAttrib();
mPanel.render0(resolution, newPt, clip, absMousex, absMousey, relMousex, relMousey, partialTicks);
+ GlStateManager.popAttrib();
GL11.glPopMatrix();
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java
index 7ac824ba..a9a6922e 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java
@@ -64,9 +64,9 @@ public class MTabbedPane extends MPanel {
@Override
public void setBounds(Rectangle bounds) {
if (bounds == null) return;
- this.bounds.x = getBounds().x;
- this.bounds.y = getBounds().y;
- this.bounds.width = getBounds().width;
- this.bounds.height = getBounds().height;
+ this.bounds.x = bounds.x;
+ this.bounds.y = bounds.y;
+ this.bounds.width = bounds.width;
+ this.bounds.height = bounds.height;
}
}