26 lines
630 B
Kotlin
26 lines
630 B
Kotlin
package codes.som.hibiscus
|
|
|
|
import codes.som.hibiscus.api.event.EventBus
|
|
import codes.som.hibiscus.events.KeyEvent
|
|
import codes.som.hibiscus.gui.ImGuiScreen
|
|
import net.fabricmc.api.ModInitializer
|
|
import org.lwjgl.glfw.GLFW.GLFW_KEY_RIGHT_SHIFT
|
|
|
|
@Suppress("UNUSED")
|
|
object HibiscusMod : ModInitializer {
|
|
private const val MOD_ID = "hibiscus_client"
|
|
|
|
@JvmStatic
|
|
@get:JvmName("bus")
|
|
val bus = EventBus()
|
|
|
|
override fun onInitialize() {
|
|
bus.register { key: KeyEvent ->
|
|
if (key.key != GLFW_KEY_RIGHT_SHIFT)
|
|
return@register
|
|
|
|
mc.setScreen(ImGuiScreen)
|
|
}
|
|
}
|
|
}
|