Fixed tooltips always being visible when a crafting monitor is disabled and there are task(s) running.
This commit is contained in:
@@ -255,9 +255,7 @@ public class GuiCraftingMonitor extends GuiBase {
|
||||
|
||||
drawTexture(x, y, 0, 0, screenWidth, screenHeight);
|
||||
|
||||
if (craftingMonitor.isActive()) {
|
||||
tabs.drawForeground(x, y - tabs.getHeight(), mouseX, mouseY);
|
||||
}
|
||||
tabs.drawForeground(x, y - tabs.getHeight(), mouseX, mouseY, craftingMonitor.isActive());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -55,19 +55,21 @@ public class TabList {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
public void drawForeground(int x, int y, int mouseX, int mouseY) {
|
||||
public void drawForeground(int x, int y, int mouseX, int mouseY, boolean visible) {
|
||||
this.tabHovering = -1;
|
||||
|
||||
int j = 0;
|
||||
for (int i = page.get() * tabsPerPage; i < (page.get() * tabsPerPage) + tabsPerPage; ++i) {
|
||||
if (i < tabs.get().size()) {
|
||||
drawTab(tabs.get().get(i), true, x, y, i, j);
|
||||
if (visible) {
|
||||
int j = 0;
|
||||
for (int i = page.get() * tabsPerPage; i < (page.get() * tabsPerPage) + tabsPerPage; ++i) {
|
||||
if (i < tabs.get().size()) {
|
||||
drawTab(tabs.get().get(i), true, x, y, i, j);
|
||||
|
||||
if (gui.inBounds(x + getXOffset() + ((IGridTab.TAB_WIDTH + 1) * j), y, IGridTab.TAB_WIDTH, IGridTab.TAB_HEIGHT - (i == selected.get() ? 2 : 7), mouseX, mouseY)) {
|
||||
this.tabHovering = i;
|
||||
if (gui.inBounds(x + getXOffset() + ((IGridTab.TAB_WIDTH + 1) * j), y, IGridTab.TAB_WIDTH, IGridTab.TAB_HEIGHT - (i == selected.get() ? 2 : 7), mouseX, mouseY)) {
|
||||
this.tabHovering = i;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -306,7 +306,7 @@ public class GuiGrid extends GuiBase implements IResizableDisplay {
|
||||
drawTexture(x + 172, y + getTopHeight() + (getVisibleRows() * 18) + 22, 240, ty * 16, 16, 16);
|
||||
}
|
||||
|
||||
tabs.drawForeground(x, y - tabs.getHeight(), mouseX, mouseY);
|
||||
tabs.drawForeground(x, y - tabs.getHeight(), mouseX, mouseY, true);
|
||||
|
||||
if (searchField != null) {
|
||||
searchField.drawTextBox();
|
||||
|
Reference in New Issue
Block a user