Make ClickGui.kt an object
This commit is contained in:
parent
7fb904246e
commit
d113c13ecc
|
@ -5,10 +5,8 @@ import fr.username404.snowygui.gui.Element
|
|||
import fr.username404.snowygui.gui.SnowyScreen
|
||||
import net.minecraft.network.chat.TranslatableComponent
|
||||
|
||||
class ClickGui: SnowyScreen() {
|
||||
private companion object {
|
||||
var GuiDragging: Boolean = false
|
||||
}
|
||||
object ClickGui: SnowyScreen() {
|
||||
private var GuiDragging: Boolean = false
|
||||
override val components: MutableSet<Element> = mutableSetOf(
|
||||
ClickBox(4.0, 4.0, TranslatableComponent("snowy.clickbox.misc")),
|
||||
ClickBox(90.0, 4.0, TranslatableComponent("snowy.clickbox.rendering"))
|
||||
|
|
|
@ -19,7 +19,7 @@ object AddKeyMaps {
|
|||
) to lambda
|
||||
}
|
||||
val list: MutableMap<KeyMapping, (() -> Unit)?> = mutableMapOf(
|
||||
mkMap("opengui", GLFW_KEY_Y) { Minecraft.getInstance().setScreen(ClickGui()) },
|
||||
mkMap("opengui", GLFW_KEY_Y) { Minecraft.getInstance().setScreen(ClickGui) },
|
||||
mkMap("configkey", GLFW_KEY_U) { Minecraft.getInstance().setScreen(SnowyConfigScreen()) }
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue