diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt | 13 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/NEURenderEvent.kt | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt index 9b4d534fc..9837e1529 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.utils.GuiRenderUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiContainer import net.minecraft.inventory.Container @@ -18,6 +19,18 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: ) : GuiContainerEvent(gui, container) @Cancelable + data class BeforeDraw( + override val gui: GuiContainer, + override val container: Container, + val mouseX: Int, + val mouseY: Int, + val partialTicks: Float, + ) : GuiContainerEvent(gui, container) { + fun drawDefaultBackground() = + GuiRenderUtils.drawGradientRect(0, 0, gui.width, gui.height, -1072689136, -804253680, 0.0) + } + + @Cancelable data class CloseWindowEvent(override val gui: GuiContainer, override val container: Container) : GuiContainerEvent(gui, container) diff --git a/src/main/java/at/hannibal2/skyhanni/events/NEURenderEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/NEURenderEvent.kt new file mode 100644 index 000000000..c2bcc9b49 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/NEURenderEvent.kt @@ -0,0 +1,6 @@ +package at.hannibal2.skyhanni.events + +import net.minecraftforge.fml.common.eventhandler.Cancelable + +@Cancelable +class NEURenderEvent : LorenzEvent() |