Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/main/java/thundr/redstonerepository/gui/GuiFeeder.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
import net.minecraft.client.renderer.GlStateManager;

import thundr.redstonerepository.RedstoneRepository;
import thundr.redstonerepository.gui.element.ElementEnergyItem;
import thundr.redstonerepository.gui.element.ElementHungerPoints;
Expand Down Expand Up @@ -44,10 +46,12 @@ public void initGui() {
if (!this.myInfo.isEmpty()) {
this.addTab(new TabInfo(this, this.myInfo));
}

//this.addFood = new ElementButton(this, 101, 26, "AddFood", 177, 64, 177, 80, 177, 96, 16, 16, this.PATH_BUTTON);
this.addFood = new ElementButton(this, 101, 26, "AddFood", 177, 64, 177, 80, 177, 96, 16, 16, this.texture.toString());
this.energy = new ElementEnergyItem(this, 151, 6, ((ContainerFeeder) this.inventorySlots).getContainerStack());
this.hungerPoints = new ElementHungerPoints(this, 160, 6, ((ContainerFeeder) this.inventorySlots).getContainerStack());

this.addElement(this.addFood);
this.addElement(this.energy);
this.addElement(this.hungerPoints);
Expand Down Expand Up @@ -85,8 +89,16 @@ protected void drawGuiContainerForegroundLayer(int x, int y) {
}

@Override
protected void drawGuiContainerBackgroundLayer(float v, int i, int i1) {
// TODO: this!
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
this.mc.getTextureManager().bindTexture(TEXTURE);
this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
GlStateManager.pushMatrix();
GlStateManager.translate((float)this.guiLeft, (float)this.guiTop, 0.0F);

this.drawElements(partialTicks, false);
this.drawTabs(partialTicks, false);

GlStateManager.popMatrix();
}

public void handleElementButtonClick(String button, int mouseButton) {
Expand Down