Compare commits
No commits in common. "ca47028e7e54f248e9b6e71fbe9fd817d7d7b67e" and "5bbca6c529cb0db0dc82f69f10b7e0434f7d9eac" have entirely different histories.
ca47028e7e
...
5bbca6c529
@ -28,7 +28,7 @@ annotation class ButtonInfo(
|
||||
HUD("snowy.clickbox.hud", Colors.DARK_PURPLE),
|
||||
MACROS("snowy.clickbox.macros", Colors.GREEN);
|
||||
companion object {
|
||||
fun fromBox(box: ClickBox): Category? = entries.find {
|
||||
fun fromBox(box: ClickBox): Category? = values().find {
|
||||
box.isCategory(it)
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ import fr.username404.snowygui.config.SnowyConfigScreen
|
||||
import fr.username404.snowygui.config.configScreenParent
|
||||
import net.minecraft.client.KeyMapping
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.resources.Identifier
|
||||
import org.lwjgl.glfw.GLFW.GLFW_KEY_U
|
||||
import org.lwjgl.glfw.GLFW.GLFW_KEY_Y
|
||||
|
||||
@ -17,14 +16,12 @@ object AddKeyMaps {
|
||||
@JvmOverloads
|
||||
internal fun mkMap(
|
||||
translationSuffix: String,
|
||||
key: Int, category: String = "controls",
|
||||
key: Int, category: String = "keycategory",
|
||||
lambda: privateLambda = null
|
||||
): Pair<KeyMapping, privateLambda> = KeyMapping(
|
||||
"key.$prefix.$translationSuffix", InputConstants.Type.KEYSYM,
|
||||
key, this.category ?: run {
|
||||
this.category = KeyMapping.Category.register(
|
||||
Identifier.fromNamespaceAndPath("snowygui", category)
|
||||
); this.category
|
||||
this.category = KeyMapping.Category.register("category.$prefix.$category"); this.category
|
||||
}!!
|
||||
) to lambda
|
||||
val list: MutableMap<KeyMapping, privateLambda> = with(Minecraft.getInstance()) {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"screen.snowy.config.behavior.zoom.factor": "Zoom factor",
|
||||
"screen.snowy.config.behavior.zoom.smoothcamera": "Smooth camera on zoom",
|
||||
"screen.snowy.config.behavior.keystrokes.position": "Position of the keystrokes HUD element",
|
||||
"key.category.snowygui.controls": "SnowyGUI",
|
||||
"category.snowy.keycategory": "SnowyGUI",
|
||||
"key.snowy.opengui": "Open the snowy gui",
|
||||
"key.snowy.configkey": "Open the snowy configuration screen",
|
||||
"snowy.clickbox.misc": "Miscellaneous",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"screen.snowy.config.behavior.zoom.factor": "Facteur de zoom",
|
||||
"screen.snowy.config.behavior.zoom.smoothcamera": "Caméra fluide pendant le zoom",
|
||||
"screen.snowy.config.behavior.keystrokes.position": "Position de l'élément keystrokes de l'ATH",
|
||||
"key.category.snowygui.controls": "SnowyGUI",
|
||||
"category.snowy.keycategory": "SnowyGUI",
|
||||
"key.snowy.opengui": "Ouvrir l'interface de snowy",
|
||||
"key.snowy.configkey": "Ouvrir l'écran de configuration de snowy",
|
||||
"snowy.clickbox.misc": "Divers",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user