Little more work on pda lots more to do
This commit is contained in:
parent
95c57bccf0
commit
c6bc7f6fb8
5 changed files with 74 additions and 7 deletions
|
@ -1,20 +1,27 @@
|
|||
package techreborn.pda;
|
||||
|
||||
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;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiPda extends GuiScreen {
|
||||
public class GuiPda extends GuiBase {
|
||||
|
||||
public final int guiHeight = 256;
|
||||
public final int guiWidth = 256;
|
||||
public final int guiHeight = 180;
|
||||
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)
|
||||
public GuiPda(EntityPlayer player, ContainerPda container)
|
||||
{
|
||||
super(container);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +30,27 @@ public class GuiPda extends GuiScreen {
|
|||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,7 +58,13 @@ public class GuiPda extends GuiScreen {
|
|||
{
|
||||
mc.getTextureManager().bindTexture(pdaGuipages);
|
||||
drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.guiWidth,this.guiHeight);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
// super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue