2015-04-18 22:24:49 +02:00
|
|
|
package techreborn.pda;
|
2015-04-18 13:13:22 +02:00
|
|
|
|
2015-06-20 12:24:04 +02:00
|
|
|
import java.awt.Container;
|
|
|
|
|
|
|
|
import techreborn.client.container.ContainerPda;
|
|
|
|
import techreborn.cofhLib.gui.GuiBase;
|
|
|
|
import techreborn.cofhLib.gui.GuiColor;
|
|
|
|
import techreborn.cofhLib.gui.element.ElementSlider;
|
2015-04-18 13:13:22 +02:00
|
|
|
import net.minecraft.client.gui.GuiScreen;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
2015-06-20 12:24:04 +02:00
|
|
|
public class GuiPda extends GuiBase {
|
2015-04-24 15:20:09 +02:00
|
|
|
|
2015-06-20 12:24:04 +02:00
|
|
|
public final int guiHeight = 256;
|
2015-04-18 13:13:22 +02:00
|
|
|
public final int guiWidth = 256;
|
2015-04-24 15:20:09 +02:00
|
|
|
private int guiLeft, guiTop;
|
2015-06-20 12:24:04 +02:00
|
|
|
private ElementSlider slider;
|
2015-04-24 15:20:09 +02:00
|
|
|
|
2015-06-20 12:24:04 +02:00
|
|
|
private static final ResourceLocation pdaGuipages = new ResourceLocation("techreborn:" + "textures/gui/pda.png");
|
2015-04-18 13:13:22 +02:00
|
|
|
|
2015-06-20 12:24:04 +02:00
|
|
|
public GuiPda(EntityPlayer player, ContainerPda container)
|
2015-04-24 15:20:09 +02:00
|
|
|
{
|
2015-06-20 12:24:04 +02:00
|
|
|
super(container);
|
2015-04-24 15:20:09 +02:00
|
|
|
}
|
2015-04-18 13:13:22 +02:00
|
|
|
|
|
|
|
@Override
|
2015-04-24 15:20:09 +02:00
|
|
|
public void initGui()
|
2015-04-18 13:13:22 +02:00
|
|
|
{
|
2015-04-21 01:55:48 +02:00
|
|
|
super.initGui();
|
2015-04-24 15:20:09 +02:00
|
|
|
this.guiLeft = this.width / 2 - this.guiWidth / 2;
|
|
|
|
this.guiTop = this.height / 2 - this.guiHeight / 2;
|
2015-06-20 12:24:04 +02:00
|
|
|
//TODO fix
|
|
|
|
slider = new ElementSlider(this, "scrollBar", 239, 36, 12, 201, 187, 0)
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
protected void dragSlider(int x, int y)
|
|
|
|
{
|
|
|
|
if (y > _value)
|
|
|
|
{
|
|
|
|
setValue(_value + 1);
|
|
|
|
}
|
|
|
|
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);
|
2015-04-18 13:13:22 +02:00
|
|
|
}
|
2015-04-24 15:20:09 +02:00
|
|
|
|
2015-04-18 13:13:22 +02:00
|
|
|
@Override
|
2015-04-24 15:20:09 +02:00
|
|
|
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
2015-04-18 13:13:22 +02:00
|
|
|
{
|
2015-04-24 15:20:09 +02:00
|
|
|
mc.getTextureManager().bindTexture(pdaGuipages);
|
2015-06-07 21:23:49 +02:00
|
|
|
drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.guiWidth,this.guiHeight);
|
2015-06-20 12:24:04 +02:00
|
|
|
// super.drawScreen(mouseX, mouseY, partialTicks);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean doesGuiPauseGame()
|
|
|
|
{
|
|
|
|
return false;
|
2015-04-18 13:13:22 +02:00
|
|
|
}
|
2015-04-21 01:55:48 +02:00
|
|
|
|
2015-04-18 13:13:22 +02:00
|
|
|
}
|