aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-06-23 20:18:45 +0200
committerGitHub <noreply@github.com>2024-06-23 20:18:45 +0200
commit739a48d4679ce05c1f555a04fcdaa4e509d59d5d (patch)
treeb7b21a3548f441db11262f1e90267c9ec4666696 /src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
parent6eb085f4e2ba69e98934ffa9489c8679ba23d244 (diff)
downloadskyhanni-739a48d4679ce05c1f555a04fcdaa4e509d59d5d.tar.gz
skyhanni-739a48d4679ce05c1f555a04fcdaa4e509d59d5d.tar.bz2
skyhanni-739a48d4679ce05c1f555a04fcdaa4e509d59d5d.zip
Backend: Drag and Drop for Renderables (#1864)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
index 9837e1529..34bc2a2a5 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
@@ -19,7 +19,7 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container:
) : GuiContainerEvent(gui, container)
@Cancelable
- data class BeforeDraw(
+ data class PreDraw(
override val gui: GuiContainer,
override val container: Container,
val mouseX: Int,
@@ -30,6 +30,14 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container:
GuiRenderUtils.drawGradientRect(0, 0, gui.width, gui.height, -1072689136, -804253680, 0.0)
}
+ data class PostDraw(
+ override val gui: GuiContainer,
+ override val container: Container,
+ val mouseX: Int,
+ val mouseY: Int,
+ val partialTicks: Float,
+ ) : GuiContainerEvent(gui, container)
+
@Cancelable
data class CloseWindowEvent(override val gui: GuiContainer, override val container: Container) :
GuiContainerEvent(gui, container)
@@ -78,7 +86,7 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container:
if (this.clickedButton == 2 && this.clickTypeEnum == ClickType.MIDDLE) return
slot?.slotNumber?.let { slotNumber ->
Minecraft.getMinecraft().playerController.windowClick(
- container.windowId, slotNumber, 2, 3, Minecraft.getMinecraft().thePlayer
+ container.windowId, slotNumber, 2, 3, Minecraft.getMinecraft().thePlayer,
)
isCanceled = true
}