diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-10-19 13:08:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 15:08:31 +0200 |
commit | 9a5cca0eaba26c40c9e2e88148bda2be161e1d70 (patch) | |
tree | 8cd1083559b54d21cb696a084ec54c5ca3d16173 | |
parent | a465173177f859f193ba014c77f0e10e7b9112e4 (diff) | |
download | NotEnoughUpdates-9a5cca0eaba26c40c9e2e88148bda2be161e1d70.tar.gz NotEnoughUpdates-9a5cca0eaba26c40c9e2e88148bda2be161e1d70.tar.bz2 NotEnoughUpdates-9a5cca0eaba26c40c9e2e88148bda2be161e1d70.zip |
Remove the extra bar textures as fsr never used them (#361)
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java | 14 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java | 4 | ||||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/core/bar_1.png | bin | 2095 -> 0 bytes | |||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/core/bar_2.png | bin | 2095 -> 0 bytes | |||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/core/bar_3.png | bin | 2095 -> 0 bytes | |||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/core/bar_on.png | bin | 2095 -> 0 bytes |
6 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java index b0586210..11547aaa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java @@ -26,7 +26,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; import java.util.function.Consumer; @@ -63,8 +62,10 @@ public class GuiElementBoolean extends GuiElement { @Override public void render() { GlStateManager.color(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.BAR); + RenderUtils.drawTexturedRect(x, y, xSize, ySize); + ResourceLocation buttonLoc = GuiTextures.ON; - ResourceLocation barLoc = GuiTextures.BAR_ON; long currentMillis = System.currentTimeMillis(); long deltaMillis = currentMillis - lastMillis; lastMillis = currentMillis; @@ -101,25 +102,16 @@ public class GuiElementBoolean extends GuiElement { int animation = (int) (LerpUtils.sigmoidZeroOne(this.animation / 36f) * 36); if (animation < 3) { buttonLoc = GuiTextures.OFF; - barLoc = GuiTextures.BAR; } else if (animation < 13) { buttonLoc = GuiTextures.ONE; - barLoc = GuiTextures.BAR_ONE; } else if (animation < 23) { buttonLoc = GuiTextures.TWO; - barLoc = GuiTextures.BAR_TWO; } else if (animation < 33) { buttonLoc = GuiTextures.THREE; - barLoc = GuiTextures.BAR_THREE; } - GL11.glTranslatef(0, 0, 100); Minecraft.getMinecraft().getTextureManager().bindTexture(buttonLoc); RenderUtils.drawTexturedRect(x + animation, y, 12, 14); - GL11.glTranslatef(0, 0, -100); - - Minecraft.getMinecraft().getTextureManager().bindTexture(barLoc); - RenderUtils.drawTexturedRect(x, y, xSize, ySize); } @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java index 3ead5a56..062e65e2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java @@ -101,10 +101,6 @@ public class GuiTextures { new ResourceLocation("notenoughupdates:descending_overlay.png"); public static final ResourceLocation BAR = new ResourceLocation("notenoughupdates:core/bar.png"); - public static final ResourceLocation BAR_ONE = new ResourceLocation("notenoughupdates:core/bar_1.png"); - public static final ResourceLocation BAR_TWO = new ResourceLocation("notenoughupdates:core/bar_2.png"); - public static final ResourceLocation BAR_THREE = new ResourceLocation("notenoughupdates:core/bar_3.png"); - public static final ResourceLocation BAR_ON = new ResourceLocation("notenoughupdates:core/bar_on.png"); public static final ResourceLocation OFF = new ResourceLocation("notenoughupdates:core/toggle_off.png"); public static final ResourceLocation ONE = new ResourceLocation("notenoughupdates:core/toggle_1.png"); public static final ResourceLocation TWO = new ResourceLocation("notenoughupdates:core/toggle_2.png"); diff --git a/src/main/resources/assets/notenoughupdates/core/bar_1.png b/src/main/resources/assets/notenoughupdates/core/bar_1.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_1.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_2.png b/src/main/resources/assets/notenoughupdates/core/bar_2.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_2.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_3.png b/src/main/resources/assets/notenoughupdates/core/bar_3.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_3.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_on.png b/src/main/resources/assets/notenoughupdates/core/bar_on.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_on.png +++ /dev/null |