gui fixs
This commit is contained in:
parent
1a580bb1d1
commit
710f9c04e7
8 changed files with 76 additions and 40 deletions
|
@ -17,15 +17,11 @@ import java.io.IOException;
|
|||
|
||||
public class GuiAesu extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
|
||||
TileAesu aesu;
|
||||
|
||||
ContainerAesu containerAesu;
|
||||
|
||||
public GuiAesu(EntityPlayer player,
|
||||
TileAesu tileaesu) {
|
||||
public GuiAesu(EntityPlayer player, TileAesu tileaesu) {
|
||||
super(new ContainerAesu(tileaesu, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 197;
|
||||
|
@ -39,15 +35,14 @@ public class GuiAesu extends GuiContainer {
|
|||
this.buttonList.clear();
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.buttonList.add(new GuiButton(0, k + 128, l + 5, 15, 15, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 128, l + 5 + 20, 15, 15, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 128, l + 5 + (20 * 2), 15, 15, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 128, l + 5 + (20 * 3), 15, 15, "--"));
|
||||
this.buttonList.add(new GuiButton(0, k + 117, l + 20, 15, 15, "++"));
|
||||
this.buttonList.add(new GuiButton(1, k + 117, l + 20 + 20, 15, 15, "+"));
|
||||
this.buttonList.add(new GuiButton(2, k + 117, l + 20 + (20 * 2), 15, 15, "-"));
|
||||
this.buttonList.add(new GuiButton(3, k + 117, l + 20 + (20 * 3), 15, 15, "--"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -55,8 +50,7 @@ public class GuiAesu extends GuiContainer {
|
|||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.aesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.storedEu) + " ", 10, 30, Color.WHITE.getRGB());
|
||||
|
|
|
@ -35,7 +35,7 @@ public class GuiGrinder extends GuiContainer {
|
|||
|
||||
j = grinder.getProgressScaled(24);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
|
||||
this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
|
||||
}
|
||||
|
||||
j = grinder.getEnergyScaled(12);
|
||||
|
|
|
@ -13,25 +13,20 @@ import java.awt.*;
|
|||
|
||||
public class GuiLesu extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
"techreborn", "textures/gui/aesu.png");
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
|
||||
TileLesu aesu;
|
||||
|
||||
ContainerLesu containerLesu;
|
||||
|
||||
public GuiLesu(EntityPlayer player,
|
||||
TileLesu tileaesu) {
|
||||
public GuiLesu(EntityPlayer player, TileLesu tileaesu) {
|
||||
super(new ContainerLesu(tileaesu, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 165;
|
||||
this.ySize = 197;
|
||||
aesu = tileaesu;
|
||||
this.containerLesu = (ContainerLesu) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
||||
int p_146976_2_, int p_146976_3_) {
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
@ -39,8 +34,7 @@ public class GuiLesu extends GuiContainer {
|
|||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
||||
int p_146979_2_) {
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.lesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euOut) + "/t", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.storedEu), 10, 30, Color.WHITE.getRGB());
|
||||
|
@ -48,5 +42,4 @@ public class GuiLesu extends GuiContainer {
|
|||
this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euStorage) + " max", 10, 60, Color.WHITE.getRGB());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue