diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-09 23:35:45 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-09 23:35:45 +0800 |
| commit | 1b21d26487636e50d03979acd5ca4a2a07761a25 (patch) | |
| tree | d7d066b4e7491474f3a962593e97a2d6f0aa2ea2 /src/main/java/me/shedaniel/gui/widget/WidgetArrow.java | |
| parent | 77af6b3f548d34bfdafc585847d3d80ec783c7e7 (diff) | |
| download | RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.tar.gz RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.tar.bz2 RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.zip | |
Starting off rewrite
Diffstat (limited to 'src/main/java/me/shedaniel/gui/widget/WidgetArrow.java')
| -rwxr-xr-x | src/main/java/me/shedaniel/gui/widget/WidgetArrow.java | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/main/java/me/shedaniel/gui/widget/WidgetArrow.java b/src/main/java/me/shedaniel/gui/widget/WidgetArrow.java deleted file mode 100755 index 8c0229f36..000000000 --- a/src/main/java/me/shedaniel/gui/widget/WidgetArrow.java +++ /dev/null @@ -1,50 +0,0 @@ -package me.shedaniel.gui.widget; - -import com.mojang.blaze3d.platform.GlStateManager; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.render.GuiLighting; -import net.minecraft.util.Identifier; - -public class WidgetArrow extends Control { - - private static final Identifier RECIPE_GUI = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); - private int progress = 0; - private int updateTick = 0; - private final int speed; - private boolean animated; - - public WidgetArrow(int x, int y, boolean animated) { - this(x, y, animated, 20); - } - - public WidgetArrow(int x, int y, boolean animated, int speed) { - super(x, y, 22, 18); - this.animated = animated; - this.speed = speed; - } - - @Override - public void draw() { - GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiLighting.disable(); - MinecraftClient.getInstance().getTextureManager().bindTexture(RECIPE_GUI); - this.drawTexturedModalRect(rect.x, rect.y, 18, 222, 22, 18); - if (animated) { - int width = (int) ((progress / 10f) * 22); - this.drawTexturedModalRect(rect.x - 1, rect.y - 1, 40, 222, width, 18); - } - } - - @Override - public void tick() { - updateTick++; - if (updateTick >= speed) { - updateTick = 0; - - progress++; - if (progress > 10) - progress = 0; - } - } - -} |
