aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java4
-rw-r--r--src/main/resources/assets/notenoughupdates/core/bar_1.pngbin2095 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/core/bar_2.pngbin2095 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/core/bar_3.pngbin2095 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/core/bar_on.pngbin2095 -> 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
deleted file mode 100644
index 664c0f32..00000000
--- a/src/main/resources/assets/notenoughupdates/core/bar_1.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/notenoughupdates/core/bar_2.png b/src/main/resources/assets/notenoughupdates/core/bar_2.png
deleted file mode 100644
index 664c0f32..00000000
--- a/src/main/resources/assets/notenoughupdates/core/bar_2.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/notenoughupdates/core/bar_3.png b/src/main/resources/assets/notenoughupdates/core/bar_3.png
deleted file mode 100644
index 664c0f32..00000000
--- a/src/main/resources/assets/notenoughupdates/core/bar_3.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/notenoughupdates/core/bar_on.png b/src/main/resources/assets/notenoughupdates/core/bar_on.png
deleted file mode 100644
index 664c0f32..00000000
--- a/src/main/resources/assets/notenoughupdates/core/bar_on.png
+++ /dev/null
Binary files differ