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 fr.username404.snowygui.gui.SnowyScreen
|
||||||
import net.minecraft.network.chat.TranslatableComponent
|
import net.minecraft.network.chat.TranslatableComponent
|
||||||
|
|
||||||
class ClickGui: SnowyScreen() {
|
object ClickGui: SnowyScreen() {
|
||||||
private companion object {
|
private var GuiDragging: Boolean = false
|
||||||
var GuiDragging: Boolean = false
|
|
||||||
}
|
|
||||||
override val components: MutableSet<Element> = mutableSetOf(
|
override val components: MutableSet<Element> = mutableSetOf(
|
||||||
ClickBox(4.0, 4.0, TranslatableComponent("snowy.clickbox.misc")),
|
ClickBox(4.0, 4.0, TranslatableComponent("snowy.clickbox.misc")),
|
||||||
ClickBox(90.0, 4.0, TranslatableComponent("snowy.clickbox.rendering"))
|
ClickBox(90.0, 4.0, TranslatableComponent("snowy.clickbox.rendering"))
|
||||||
|
@ -19,7 +19,7 @@ object AddKeyMaps {
|
|||||||
) to lambda
|
) to lambda
|
||||||
}
|
}
|
||||||
val list: MutableMap<KeyMapping, (() -> Unit)?> = mutableMapOf(
|
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()) }
|
mkMap("configkey", GLFW_KEY_U) { Minecraft.getInstance().setScreen(SnowyConfigScreen()) }
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user