aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-18 23:35:41 +0900
committersyeyoung <cyong06@naver.com>2021-07-18 23:35:41 +0900
commit0af44a60844be83fb371c2f0eaeb2feccd1f0207 (patch)
tree1ac67087eeb7afb1afb7b7afa2d22d3f3c7b3748 /src/main/java/kr/syeyoung/dungeonsguide/features
parente4ac7cf162d4383424a0798f160073b8d5bc1f1b (diff)
downloadSkyblock-Dungeons-Guide-0af44a60844be83fb371c2f0eaeb2feccd1f0207.tar.gz
Skyblock-Dungeons-Guide-0af44a60844be83fb371c2f0eaeb2feccd1f0207.tar.bz2
Skyblock-Dungeons-Guide-0af44a60844be83fb371c2f0eaeb2feccd1f0207.zip
Modification to GUI Framework
- Mostly removes Scaled GUI - Also has done some fixes to gui relocation
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java10
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
index dd4ed7e4..e195a7d9 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
@@ -63,9 +63,8 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender
if (!isEnabled()) return;
GlStateManager.pushAttrib();
GlStateManager.pushMatrix();
- ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
- Rectangle featureRect = this.featureRect.getRectangle(scaledResolution);
- clip(scaledResolution, featureRect.x, featureRect.y, featureRect.width, featureRect.height);
+ Rectangle featureRect = this.featureRect.getRectangleNoScale();
+ clip(featureRect.x, featureRect.y, featureRect.width, featureRect.height);
GL11.glEnable(GL11.GL_SCISSOR_TEST);
GlStateManager.translate(featureRect.x, featureRect.y, 0);
@@ -88,8 +87,9 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender
drawHUD(partialTicks);
}
- private void clip(ScaledResolution resolution, int x, int y, int width, int height) {
- int scale = resolution.getScaleFactor();
+ private void clip(int x, int y, int width, int height) {
+// int scale = resolution.getScaleFactor();
+ int scale = 1;
GL11.glScissor((x ) * scale, Minecraft.getMinecraft().displayHeight - (y + height) * scale, (width) * scale, height * scale);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
index 23132b3a..6559bd61 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
@@ -152,7 +152,6 @@ public class PanelTextParameterConfig extends MPanel {
GlStateManager.popMatrix();
GlStateManager.translate(5, height + 7, 0);
- GlStateManager.scale(0.5,0.5,0);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
GlStateManager.enableBlend();
GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -163,7 +162,6 @@ public class PanelTextParameterConfig extends MPanel {
GlStateManager.pushMatrix();
GlStateManager.translate(width + 15, 5, 0);
GlStateManager.pushMatrix();
- GlStateManager.scale(0.5,0.5,0);
fr.drawString("Selected Groups: "+selected, 0, 0, 0xFFBFBFBF);
GlStateManager.popMatrix();
fr.drawString("Text Color: ", 0, 10, 0xFFFFFFFF);