Move of stuffs

This commit is contained in:
WayofTime 2014-11-03 21:10:17 -05:00
parent 7946a7c226
commit 16efbcf7c5
26 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,38 @@
package bloodutils.api.classes.guide.buttons;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
public class ButtonNext extends GuiButton {
private final boolean field_146151_o;
public ButtonNext(int id, int x, int y, boolean p_i1079_4_){
super(id, x, y, 23, 13, "");
this.field_146151_o = p_i1079_4_;
}
public void drawButton(Minecraft mc, int p_146112_2_, int p_146112_3_){
if (this.visible){
boolean flag = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;
GL11.glEnable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.getTextureManager().bindTexture(new ResourceLocation("bloodutils:textures/gui/guide.png"));
int k = 0;
int l = 192;
if (flag){
k += 23;
}
if (!this.field_146151_o){
l += 13;
}
this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 23, 13);
GL11.glDisable(GL11.GL_BLEND);
}
}
}

View file

@ -0,0 +1,33 @@
package bloodutils.api.classes.guide.buttons;
import java.awt.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
public class ButtonPage extends GuiButton {
public ButtonPage(int id, int xPos, int yPos, int width, int height, String string) {
super(id, xPos, yPos, width, height, string);
}
int gwidth = 170;
int gheight = 180;
@Override
public void drawButton(Minecraft mc, int x, int y) {
field_146123_n = x >= xPosition && y >= yPosition && x < xPosition + width && y < yPosition + height;
int state = getHoverState(field_146123_n);
x = this.xPosition + width / 2 - 30;
y = this.yPosition + (height - 6) / 2;
mc.fontRenderer.setUnicodeFlag(true);
mc.fontRenderer.drawString(displayString, x + (state == 2 ? 5 : 0), y, calcColor(state));
mc.fontRenderer.setUnicodeFlag(false);
}
public int calcColor(int state){
if(state == 2)
return new Color(155, 155, 155).getRGB();
else
return new Color(55, 55, 55).getRGB();
}
}