Skip to content

Commit

Permalink
Rework stencil table button layout to weaponry and more NEI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 24, 2014
1 parent 939bd8a commit 5bfdb0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/tools/gui/StencilTableGui.java
Expand Up @@ -168,7 +168,7 @@ public boolean handleDragNDrop(GuiContainer guiContainer, int i, int i2, ItemSta
public boolean hideItemPanelSlot(GuiContainer guiContainer, int x, int y, int w, int h) {
// is it in the horizontal column of the right buttons?
if(x > this.guiLeft + this.xSize + 4 && x < this.guiLeft + this.xSize + 4 + 22*3 + 16)
if(y > this.guiTop + 2 && y < this.guiTop + 2 + 22*(TConstructClientRegistry.stencilButtons2.size()-1)/4)
if(y > this.guiTop - 10 && y < this.guiTop + 2 + 22*(TConstructClientRegistry.stencilButtons2.size()-1)/4 + 22*(TConstructClientRegistry.stencilButtons2.size()%4 > 0 ? 1 : 0))
return true;

return false;
Expand Down
16 changes: 11 additions & 5 deletions src/main/java/tconstruct/weaponry/WeaponryClientProxy.java
Expand Up @@ -98,11 +98,17 @@ private void registerMaterialRendering()

private void buttons()
{
int base = StencilBuilder.getIndex(new ItemStack(TinkerWeaponry.woodPattern, 0, 0));
TConstructClientRegistry.addStencilButton2(0, 4, base + 0, Reference.RESOURCE, "textures/gui/icons.png"); // shuriken
TConstructClientRegistry.addStencilButton2(1, 4, base + 1, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow limb
TConstructClientRegistry.addStencilButton2(2, 4, base + 2, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow body
TConstructClientRegistry.addStencilButton2(3, 4, base + 3, Reference.RESOURCE, "textures/gui/icons.png"); // bow limb
TConstructClientRegistry.addStencilButton2(11, 3, 21, Reference.RESOURCE, "textures/gui/icons.png"); // arrow head
TConstructClientRegistry.addStencilButton2(12, 3, 22, Reference.RESOURCE, "textures/gui/icons.png"); // fletchling
TConstructClientRegistry.addStencilButton2(0,0, -1, null, null);
TConstructClientRegistry.addStencilButton2(0,0, -1, null, null);

TConstructClientRegistry.addStencilButton2(3, 4, 27, Reference.RESOURCE, "textures/gui/icons.png"); // bow limb
TConstructClientRegistry.addStencilButton2(10, 3, 23, Reference.RESOURCE, "textures/gui/icons.png"); // bowstring
TConstructClientRegistry.addStencilButton2(1, 4, 25, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow limb
TConstructClientRegistry.addStencilButton2(2, 4, 26, Reference.RESOURCE, "textures/gui/icons.png"); // crossbow body

TConstructClientRegistry.addStencilButton2(0, 4, 24, Reference.RESOURCE, "textures/gui/icons.png"); // shuriken
//TConstructClientRegistry.addStencilButton2(4, 4, index, Reference.RESOURCE, "textures/gui/icons.png"); // bolt
}
}

0 comments on commit 5bfdb0d

Please sign in to comment.