Reformatted all the code using the default intelji formatting options.

This commit is contained in:
modmuss50 2015-08-09 11:05:32 +01:00
parent 2f63a24070
commit e0ab0af822
363 changed files with 20524 additions and 23016 deletions

View file

@ -7,39 +7,35 @@ import org.lwjgl.opengl.GL11;
public class GuiButtonCustomTexture extends GuiButtonExt {
public int textureU;
public int textureV;
public ResourceLocation texture;
public int textureU;
public int textureV;
public ResourceLocation texture;
public GuiButtonCustomTexture(int id, int xPos, int yPos, int u, int v,
int width, int height, ResourceLocation loc)
{
super(id, xPos, yPos, width, height, "_");
textureU = u;
textureV = v;
texture = loc;
}
public GuiButtonCustomTexture(int id, int xPos, int yPos, int u, int v,
int width, int height, ResourceLocation loc) {
super(id, xPos, yPos, width, height, "_");
textureU = u;
textureV = v;
texture = loc;
}
public void drawButton(Minecraft mc, int mouseX, int mouseY)
{
if (this.visible)
{
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition
&& mouseX < this.xPosition + this.width
&& mouseY < this.yPosition + this.height;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.getTextureManager().bindTexture(texture);
int u = textureU;
int v = textureV;
public void drawButton(Minecraft mc, int mouseX, int mouseY) {
if (this.visible) {
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition
&& mouseX < this.xPosition + this.width
&& mouseY < this.yPosition + this.height;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.getTextureManager().bindTexture(texture);
int u = textureU;
int v = textureV;
if (flag)
{
u += width;
}
if (flag) {
u += width;
}
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v,
width, height);
}
}
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v,
width, height);
}
}
}

View file

@ -9,59 +9,50 @@ import techreborn.cofhLib.gui.element.ElementSlider;
public class GuiPda extends GuiBase {
public final int guiHeight = 256;
public final int guiWidth = 256;
private int guiLeft, guiTop;
private ElementSlider slider;
public final int guiHeight = 256;
public final int guiWidth = 256;
private int guiLeft, guiTop;
private ElementSlider slider;
private static final ResourceLocation pdaGuipages = new ResourceLocation("techreborn:" + "textures/gui/pda.png");
private static final ResourceLocation pdaGuipages = new ResourceLocation("techreborn:" + "textures/gui/pda.png");
public GuiPda(EntityPlayer player, ContainerPda container)
{
super(container);
}
public GuiPda(EntityPlayer player, ContainerPda container) {
super(container);
}
@Override
public void initGui()
{
super.initGui();
this.guiLeft = this.width / 2 - this.guiWidth / 2;
this.guiTop = this.height / 2 - this.guiHeight / 2;
//TODO fix
slider = new ElementSlider(this, "scrollBar", 239, 36, 12, 201, 187, 0)
{
@Override
public void initGui() {
super.initGui();
this.guiLeft = this.width / 2 - this.guiWidth / 2;
this.guiTop = this.height / 2 - this.guiHeight / 2;
//TODO fix
slider = new ElementSlider(this, "scrollBar", 239, 36, 12, 201, 187, 0) {
@Override
protected void dragSlider(int x, int y)
{
if (y > _value)
{
protected void dragSlider(int x, int y) {
if (y > _value) {
setValue(_value + 1);
}
else
{
} else {
setValue(_value - 1);
}
}
};
slider.backgroundColor = new GuiColor(0, 0, 0, 0).getColor();
slider.borderColor = new GuiColor(0, 0, 0, 0).getColor();
slider.setSliderSize(12, 15);
addElement(slider);
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
mc.getTextureManager().bindTexture(pdaGuipages);
drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.guiWidth,this.guiHeight);
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
mc.getTextureManager().bindTexture(pdaGuipages);
drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.guiWidth, this.guiHeight);
// super.drawScreen(mouseX, mouseY, partialTicks);
}
@Override
public boolean doesGuiPauseGame()
{
return false;
}
}
@Override
public boolean doesGuiPauseGame() {
return false;
}
}