From e15406e22ef65b4933274df791632b6c17f594be Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 28 Oct 2023 03:36:11 +0200 Subject: Add Inventory Buttons --- .../moe/nea/firmament/events/HandledScreenClickEvent.kt | 14 ++++++++++++++ .../nea/firmament/events/HandledScreenForegroundEvent.kt | 6 +++++- .../kotlin/moe/nea/firmament/events/ScreenClickEvent.kt | 14 -------------- 3 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 src/main/kotlin/moe/nea/firmament/events/HandledScreenClickEvent.kt delete mode 100644 src/main/kotlin/moe/nea/firmament/events/ScreenClickEvent.kt (limited to 'src/main/kotlin/moe/nea/firmament/events') diff --git a/src/main/kotlin/moe/nea/firmament/events/HandledScreenClickEvent.kt b/src/main/kotlin/moe/nea/firmament/events/HandledScreenClickEvent.kt new file mode 100644 index 0000000..0c4d4f6 --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/events/HandledScreenClickEvent.kt @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2023 Linnea Gräf + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package moe.nea.firmament.events + +import net.minecraft.client.gui.screen.ingame.HandledScreen + +data class HandledScreenClickEvent(val screen: HandledScreen<*>, val mouseX: Double, val mouseY: Double, val button: Int) : + FirmamentEvent.Cancellable() { + companion object : FirmamentEventBus() +} diff --git a/src/main/kotlin/moe/nea/firmament/events/HandledScreenForegroundEvent.kt b/src/main/kotlin/moe/nea/firmament/events/HandledScreenForegroundEvent.kt index d45b484..95f9b70 100644 --- a/src/main/kotlin/moe/nea/firmament/events/HandledScreenForegroundEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/HandledScreenForegroundEvent.kt @@ -6,11 +6,15 @@ package moe.nea.firmament.events +import net.minecraft.client.gui.DrawContext import net.minecraft.client.gui.screen.ingame.HandledScreen data class HandledScreenForegroundEvent( val screen: HandledScreen<*>, - val mouseX: Int, val mouseY: Int, val delta: Float + val context: DrawContext, + val mouseX: Int, + val mouseY: Int, + val delta: Float ) : FirmamentEvent() { companion object : FirmamentEventBus() } diff --git a/src/main/kotlin/moe/nea/firmament/events/ScreenClickEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ScreenClickEvent.kt deleted file mode 100644 index 0977971..0000000 --- a/src/main/kotlin/moe/nea/firmament/events/ScreenClickEvent.kt +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 Linnea Gräf - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -package moe.nea.firmament.events - -import net.minecraft.client.gui.screen.ingame.HandledScreen - -data class ScreenClickEvent(val screen: HandledScreen<*>, val mouseX: Double, val mouseY: Double, val button: Int) : - FirmamentEvent.Cancellable() { - companion object : FirmamentEventBus() -} -- cgit