Show phantom slot tooltips outside terminals (#1390)

This commit is contained in:
Kogepan229 authored and GitHub committed 2026-06-18 21:01:57 +02:00
1 parent ed57a116db
commit 702b58d15e
2 files changed
+14 -11

No files matched your search

+14 -1
View File
@@ -341,14 +341,27 @@ public abstract class AEBaseGui extends GuiContainer implements IGuiTooltipHandl
this.currentToolTip.shift(ox, oy);
this.drawFG(ox, oy, x, y);
this.currentToolTip.shift(0, 0);
this.hoveredVirtualSlot = null;
this.drawVirtualSlots(this.virtualSlots, x, y);
this.drawVirtualSlotTooltips(x, y);
this.currentToolTip.shift(0, 0);
}
public abstract void drawFG(int offsetX, int offsetY, int mouseX, int mouseY);
protected void drawVirtualSlotTooltips(final int mouseX, final int mouseY) {
VirtualMESlot slot = this.getVirtualMESlotUnderMouse();
if (slot != null) {
List<String> lines = new ArrayList<>();
slot.addTooltip(lines);
if (!lines.isEmpty()) {
this.drawTooltip(mouseX - guiLeft, mouseY - guiTop, lines.toArray(new String[0]));
}
}
}
@Override
protected final void drawGuiContainerBackgroundLayer(final float f, final int x, final int y) {
final int ox = this.guiLeft;
@@ -14,7 +14,6 @@ import static appeng.util.item.AEItemStackType.ITEM_STACK_TYPE;
import java.io.IOException;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Locale;
@@ -612,15 +611,6 @@ public class GuiMEMonitorable extends AEBaseGui
this.currentMouseX = mouseX;
this.currentMouseY = mouseY;
VirtualMESlot slot = this.getVirtualMESlotUnderMouse();
if (slot != null) {
List<String> lines = new ArrayList<>();
slot.addTooltip(lines);
if (!lines.isEmpty()) {
this.drawTooltip(mouseX - guiLeft, mouseY - guiTop, lines.toArray(new String[0]));
}
}
}
@Override