mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-25 20:32:32 +00:00
Fix clicking on inventory slots (#37)
* Fix clicking on inventory slots. * resort to hacks * one more hack
This commit is contained in:
1 parent
1c46541223
commit
171d1b3f25
1 file changed
+19
-3
@@ -375,9 +375,9 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler {
|
||||
chestLeft = guiLeft - chestWidth;
|
||||
chestTop = guiTop;
|
||||
|
||||
// Leaving out the xsize increase by chestSize and adjusting where it's used, because otherwise it shifts both the bookmarks and item panel
|
||||
// way too far out.
|
||||
//xSize += guiLeft - chestLeft;
|
||||
// Leaving out the xSize increase by chestSize and adjusting where it's used, because otherwise it shifts both the bookmarks and item panel
|
||||
// way too far out. If anything (mouseClick, for example) relies on xSize, you'll need to hack it like below.
|
||||
// xSize += guiLeft - chestLeft;
|
||||
guiLeft = chestLeft;
|
||||
|
||||
if (logic.doubleChest != null)
|
||||
@@ -393,6 +393,22 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler {
|
||||
|
||||
updateChestSlots();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int button) {
|
||||
// Hacks
|
||||
xSize += chestWidth;
|
||||
super.mouseClicked(x, y, button);
|
||||
xSize -= chestWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseMovedOrUp(int x, int y, int button) {
|
||||
// Hacks
|
||||
xSize += chestWidth;
|
||||
super.mouseMovedOrUp(x, y, button);
|
||||
xSize -= chestWidth;
|
||||
}
|
||||
|
||||
// updates slot visibility
|
||||
protected void updateChestSlots() {
|
||||
|
||||
Reference in new issue
Block a user