mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-14 01:14:11 +00:00
Show phantom slot tooltips outside terminals (#1390)
This commit is contained in:
1 parent
ed57a116db
commit
702b58d15e
2 files changed
+14
-11
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user