aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui/WarningGui.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-02-10 20:42:47 -0500
committerGitHub <noreply@github.com>2021-02-10 20:42:47 -0500
commite973a5e27090525713740e8b026c1d4b7c93b30e (patch)
tree938df6b8f67a41e2c291b5425f54d3640b9b690a /src/main/java/me/Danker/gui/WarningGui.java
parentb65d69d3d9a4548dbec534260453321da83bd0eb (diff)
parent956625ccd8926cafb2d9b2b25a695d648ee63900 (diff)
downloadSkyblockMod-e973a5e27090525713740e8b026c1d4b7c93b30e.tar.gz
SkyblockMod-e973a5e27090525713740e8b026c1d4b7c93b30e.tar.bz2
SkyblockMod-e973a5e27090525713740e8b026c1d4b7c93b30e.zip
Merge pull request #49 from Sychic/development
Features: Old Animations Warning, cooldown messages, mana messages, and secrets found
Diffstat (limited to 'src/main/java/me/Danker/gui/WarningGui.java')
-rw-r--r--src/main/java/me/Danker/gui/WarningGui.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/gui/WarningGui.java b/src/main/java/me/Danker/gui/WarningGui.java
new file mode 100644
index 0000000..63b4710
--- /dev/null
+++ b/src/main/java/me/Danker/gui/WarningGui.java
@@ -0,0 +1,61 @@
+package me.Danker.gui;
+
+import akka.event.Logging;
+import me.Danker.handlers.TextRenderer;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiLabel;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+
+import javax.xml.soap.Text;
+import java.util.ArrayList;
+import java.util.List;
+
+public class WarningGui extends GuiScreen {
+ private GuiButton close;
+
+ public WarningGui(){
+
+ }
+
+ @Override
+ public boolean doesGuiPauseGame() {
+ return false;
+ }
+
+ @Override
+ public void initGui() {
+ super.initGui();
+
+ ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
+ int height = sr.getScaledHeight();
+ int width = sr.getScaledWidth();
+
+ close = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Close");
+
+ this.buttonList.add(close);
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ this.drawDefaultBackground();
+ String text0 = "§cWARNING!§0";
+ int text0Width = mc.fontRendererObj.getStringWidth(text0);
+ new TextRenderer(mc, text0, (int)(width * 0.45) - text0Width / 2, (int) (height * 0.1), 2 );
+ String text1 = "You are using SpiderFrog's Old Animations mod.";
+ int text1Width = mc.fontRendererObj.getStringWidth(text1);
+ new TextRenderer(mc, text1, width / 2 - text1Width / 2, (int) (height * 0.3), 1D );
+ String text2 = "This mod breaks Danker's Skyblock Mod.";
+ int text2Width = mc.fontRendererObj.getStringWidth(text2);
+ new TextRenderer(mc, text2, width / 2 - text2Width / 2, (int) (height * 0.4), 1D);
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+
+ @Override
+ public void actionPerformed(GuiButton button){
+ if(button == close) {
+ Minecraft.getMinecraft().displayGuiScreen(null);
+ }
+ }
+}