From 365c39904a214009b77f2018b360e5784a3ce89e Mon Sep 17 00:00:00 2001 From: miozune Date: Wed, 21 Sep 2022 12:07:45 +0900 Subject: [PATCH] Add debug info for BaseSlot index & shift-click priority --- .../modularui/common/internal/wrapper/ModularGui.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java b/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java index a7b8605..3dc8136 100644 --- a/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java +++ b/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java @@ -25,6 +25,7 @@ import com.gtnewhorizons.modularui.api.widget.IWidgetParent; import com.gtnewhorizons.modularui.api.widget.Interactable; import com.gtnewhorizons.modularui.api.widget.Widget; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.config.Config; import com.gtnewhorizons.modularui.mixins.GuiContainerMixin; import cpw.mods.fml.common.Optional; @@ -349,6 +350,13 @@ public void drawDebugScreen() { false); lineY -= 11; drawText("Class: " + hovered, 5, lineY, 1, color, false); + lineY -= 11; + if (hovered instanceof SlotWidget) { + BaseSlot slot = ((SlotWidget) hovered).getMcSlot(); + drawText("Slot Index: " + slot.getSlotIndex(), 5, lineY, 1, color, false); + lineY -= 11; + drawText("Shift-Click Priority: " + slot.getShiftClickPriority(), 5, lineY, 1, color, false); + } } color = Color.withAlpha(color, 25); for (int i = 5; i < screenSize.width; i += 5) {