diff options
author | syeyoung <cyong06@naver.com> | 2021-08-05 12:59:58 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-05 12:59:58 +0900 |
commit | 11f69f60bc6cdacf73784ba2900617a5db38a68e (patch) | |
tree | ab24fa0503bb8756622b13fdeff3a515e3341bbd /src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig | |
parent | 64cd5e6d0a571c95c2435bfc232522d7ca8d5d87 (diff) | |
download | Skyblock-Dungeons-Guide-11f69f60bc6cdacf73784ba2900617a5db38a68e.tar.gz Skyblock-Dungeons-Guide-11f69f60bc6cdacf73784ba2900617a5db38a68e.tar.bz2 Skyblock-Dungeons-Guide-11f69f60bc6cdacf73784ba2900617a5db38a68e.zip |
- Add a message on gui relocate
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/location/GuiGuiLocationConfig.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/location/GuiGuiLocationConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/location/GuiGuiLocationConfig.java index 9f33536e..8ce2aa8f 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/location/GuiGuiLocationConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/location/GuiGuiLocationConfig.java @@ -25,8 +25,12 @@ import kr.syeyoung.dungeonsguide.gui.MGui; import kr.syeyoung.dungeonsguide.gui.MPanel; import lombok.Getter; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.Vec3; +import org.lwjgl.opengl.GL11; import java.awt.*; import java.io.IOException; @@ -112,6 +116,22 @@ public class GuiGuiLocationConfig extends MGui { } } + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + GlStateManager.pushMatrix(); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GlStateManager.translate(scaledResolution.getScaledWidth()/2, scaledResolution.getScaledHeight()/2, 0); + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + GlStateManager.enableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); + GlStateManager.color(1, 1, 1, 1); + fr.drawString("Right Click On Elements to Open Popup Menu", + -fr.getStringWidth("Right Click On Elements to Open Popup Menu")/2 + ,-fr.FONT_HEIGHT/2, -1); + GlStateManager.popMatrix(); + super.drawScreen(mouseX, mouseY, partialTicks); + } @Override public void keyTyped(char typedChar, int keyCode) throws IOException { |