Fixed ItemZoom incompatibility in Grid. Fixes #1844
This commit is contained in:
@@ -218,7 +218,7 @@ public class GuiGrid extends GuiBase implements IResizableDisplay {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isOverSlotWithStack() {
|
||||
private boolean isOverSlotWithStack() {
|
||||
return grid.isActive() && isOverSlot() && slotNumber < view.getStacks().size();
|
||||
}
|
||||
|
||||
@@ -310,6 +310,17 @@ public class GuiGrid extends GuiBase implements IResizableDisplay {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
// Drawn in here for bug #1844 (https://github.com/raoulvdberge/refinedstorage/issues/1844)
|
||||
// Item tooltips can't be rendered in the foreground layer due to the X offset translation.
|
||||
if (isOverSlotWithStack()) {
|
||||
drawGridTooltip(view.getStacks().get(slotNumber), mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawForeground(int mouseX, int mouseY) {
|
||||
drawString(7, 7 + tabs.getHeight(), t(grid.getGuiTitle()));
|
||||
@@ -357,10 +368,6 @@ public class GuiGrid extends GuiBase implements IResizableDisplay {
|
||||
}
|
||||
}
|
||||
|
||||
if (isOverSlotWithStack()) {
|
||||
drawGridTooltip(view.getStacks().get(slotNumber), mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (isOverClear(mouseX, mouseY)) {
|
||||
drawTooltip(mouseX, mouseY, t("misc.refinedstorage:clear"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user