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,9 +55,10 @@ 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;
|
||||
|
||||
if (visible) {
|
||||
int j = 0;
|
||||
for (int i = page.get() * tabsPerPage; i < (page.get() * tabsPerPage) + tabsPerPage; ++i) {
|
||||
if (i < tabs.get().size()) {
|
||||
@@ -71,6 +72,7 @@ public class TabList {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void update() {
|
||||
boolean hasTabs = !tabs.get().isEmpty();
|
||||
|
@@ -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