Tweak grid GUI's a bit
This commit is contained in:
@@ -21,11 +21,11 @@ public class ContainerGrid extends ContainerBase {
|
|||||||
|
|
||||||
this.grid = grid;
|
this.grid = grid;
|
||||||
|
|
||||||
addPlayerInventory(8, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 174 : 126);
|
addPlayerInventory(8, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 167 : 126);
|
||||||
|
|
||||||
if (grid.getType() == EnumGridType.CRAFTING) {
|
if (grid.getType() == EnumGridType.CRAFTING) {
|
||||||
int x = 25;
|
int x = 26;
|
||||||
int y = 106;
|
int y = 98;
|
||||||
|
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (int i = 0; i < 9; ++i) {
|
||||||
addSlotToContainer(new SlotGridCrafting(((TileGrid) grid).getMatrix(), i, x, y));
|
addSlotToContainer(new SlotGridCrafting(((TileGrid) grid).getMatrix(), i, x, y));
|
||||||
@@ -34,14 +34,14 @@ public class ContainerGrid extends ContainerBase {
|
|||||||
|
|
||||||
if ((i + 1) % 3 == 0) {
|
if ((i + 1) % 3 == 0) {
|
||||||
y += 18;
|
y += 18;
|
||||||
x = 25;
|
x = 26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addSlotToContainer(craftingResultSlot = new SlotGridCraftingResult(this, player, (TileGrid) grid, 0, 133 + 4, 120 + 4));
|
addSlotToContainer(craftingResultSlot = new SlotGridCraftingResult(this, player, (TileGrid) grid, 0, 130 + 4, 112 + 4));
|
||||||
} else if (grid.getType() == EnumGridType.PATTERN) {
|
} else if (grid.getType() == EnumGridType.PATTERN) {
|
||||||
int x = 8;
|
int x = 8;
|
||||||
int y = 106;
|
int y = 98;
|
||||||
|
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (int i = 0; i < 9; ++i) {
|
||||||
addSlotToContainer(new SlotSpecimenLegacy(((TileGrid) grid).getMatrix(), i, x, y, false));
|
addSlotToContainer(new SlotSpecimenLegacy(((TileGrid) grid).getMatrix(), i, x, y, false));
|
||||||
@@ -54,10 +54,10 @@ public class ContainerGrid extends ContainerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addSlotToContainer(patternResultSlot = new SlotDisabled(((TileGrid) grid).getResult(), 0, 116 + 4, 120 + 4));
|
addSlotToContainer(patternResultSlot = new SlotDisabled(((TileGrid) grid).getResult(), 0, 112 + 4, 112 + 4));
|
||||||
|
|
||||||
addSlotToContainer(new SlotItemHandler(((TileGrid) grid).getPatterns(), 0, 152, 104));
|
addSlotToContainer(new SlotItemHandler(((TileGrid) grid).getPatterns(), 0, 152, 97));
|
||||||
addSlotToContainer(new SlotOutput(((TileGrid) grid).getPatterns(), 1, 152, 144));
|
addSlotToContainer(new SlotOutput(((TileGrid) grid).getPatterns(), 1, 152, 137));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class GuiGrid extends GuiBase {
|
|||||||
private int slotNumber;
|
private int slotNumber;
|
||||||
|
|
||||||
public GuiGrid(ContainerGrid container, IGrid grid) {
|
public GuiGrid(ContainerGrid container, IGrid grid) {
|
||||||
super(container, 193, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 256 : 208);
|
super(container, 193, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 249 : 208);
|
||||||
|
|
||||||
setScrollbar(new Scrollbar(174, 20, 12, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 70 : 88));
|
setScrollbar(new Scrollbar(174, 20, 12, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 70 : 88));
|
||||||
getScrollbar().setCanScroll(false);
|
getScrollbar().setCanScroll(false);
|
||||||
@@ -204,16 +204,16 @@ public class GuiGrid extends GuiBase {
|
|||||||
public boolean isOverClear(int mouseX, int mouseY) {
|
public boolean isOverClear(int mouseX, int mouseY) {
|
||||||
switch (grid.getType()) {
|
switch (grid.getType()) {
|
||||||
case CRAFTING:
|
case CRAFTING:
|
||||||
return inBounds(81, 105, 7, 7, mouseX, mouseY);
|
return inBounds(82, 97, 7, 7, mouseX, mouseY);
|
||||||
case PATTERN:
|
case PATTERN:
|
||||||
return inBounds(64, 105, 7, 7, mouseX, mouseY);
|
return inBounds(64, 97, 7, 7, mouseX, mouseY);
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOverCreatePattern(int mouseX, int mouseY) {
|
public boolean isOverCreatePattern(int mouseX, int mouseY) {
|
||||||
return grid.getType() == EnumGridType.PATTERN && inBounds(152, 124, 16, 16, mouseX, mouseY) && ((TileGrid) grid).canCreatePattern();
|
return grid.getType() == EnumGridType.PATTERN && inBounds(152, 117, 16, 16, mouseX, mouseY) && ((TileGrid) grid).canCreatePattern();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,7 +239,7 @@ public class GuiGrid extends GuiBase {
|
|||||||
ty = 2;
|
ty = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawTexture(x + 152, y + 124, 195, ty * 16, 16, 16);
|
drawTexture(x + 64, y + 97, 195, ty * 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
searchField.drawTextBox();
|
searchField.drawTextBox();
|
||||||
@@ -248,14 +248,7 @@ public class GuiGrid extends GuiBase {
|
|||||||
@Override
|
@Override
|
||||||
public void drawForeground(int mouseX, int mouseY) {
|
public void drawForeground(int mouseX, int mouseY) {
|
||||||
drawString(7, 7, t(grid instanceof WirelessGrid ? "gui.refinedstorage:wireless_grid" : "gui.refinedstorage:grid"));
|
drawString(7, 7, t(grid instanceof WirelessGrid ? "gui.refinedstorage:wireless_grid" : "gui.refinedstorage:grid"));
|
||||||
|
drawString(7, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 155 : 114, t("container.inventory"));
|
||||||
if (grid.getType() == EnumGridType.CRAFTING) {
|
|
||||||
drawString(7, 95, t("container.crafting"));
|
|
||||||
} else if (grid.getType() == EnumGridType.PATTERN) {
|
|
||||||
drawString(7, 95, t("gui.refinedstorage:grid.pattern"));
|
|
||||||
}
|
|
||||||
|
|
||||||
drawString(7, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 163 : 114, t("container.inventory"));
|
|
||||||
|
|
||||||
int x = 8;
|
int x = 8;
|
||||||
int y = 20;
|
int y = 20;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user