Fix controls category name
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
21c53e496a
commit
ca47028e7e
@ -6,6 +6,7 @@ import fr.username404.snowygui.config.SnowyConfigScreen
|
|||||||
import fr.username404.snowygui.config.configScreenParent
|
import fr.username404.snowygui.config.configScreenParent
|
||||||
import net.minecraft.client.KeyMapping
|
import net.minecraft.client.KeyMapping
|
||||||
import net.minecraft.client.Minecraft
|
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_U
|
||||||
import org.lwjgl.glfw.GLFW.GLFW_KEY_Y
|
import org.lwjgl.glfw.GLFW.GLFW_KEY_Y
|
||||||
|
|
||||||
@ -16,12 +17,14 @@ object AddKeyMaps {
|
|||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
internal fun mkMap(
|
internal fun mkMap(
|
||||||
translationSuffix: String,
|
translationSuffix: String,
|
||||||
key: Int, category: String = "keycategory",
|
key: Int, category: String = "controls",
|
||||||
lambda: privateLambda = null
|
lambda: privateLambda = null
|
||||||
): Pair<KeyMapping, privateLambda> = KeyMapping(
|
): Pair<KeyMapping, privateLambda> = KeyMapping(
|
||||||
"key.$prefix.$translationSuffix", InputConstants.Type.KEYSYM,
|
"key.$prefix.$translationSuffix", InputConstants.Type.KEYSYM,
|
||||||
key, this.category ?: run {
|
key, this.category ?: run {
|
||||||
this.category = KeyMapping.Category.register("category.$prefix.$category"); this.category
|
this.category = KeyMapping.Category.register(
|
||||||
|
Identifier.fromNamespaceAndPath("snowygui", category)
|
||||||
|
); this.category
|
||||||
}!!
|
}!!
|
||||||
) to lambda
|
) to lambda
|
||||||
val list: MutableMap<KeyMapping, privateLambda> = with(Minecraft.getInstance()) {
|
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.factor": "Zoom factor",
|
||||||
"screen.snowy.config.behavior.zoom.smoothcamera": "Smooth camera on zoom",
|
"screen.snowy.config.behavior.zoom.smoothcamera": "Smooth camera on zoom",
|
||||||
"screen.snowy.config.behavior.keystrokes.position": "Position of the keystrokes HUD element",
|
"screen.snowy.config.behavior.keystrokes.position": "Position of the keystrokes HUD element",
|
||||||
"category.snowy.keycategory": "SnowyGUI",
|
"key.category.snowygui.controls": "SnowyGUI",
|
||||||
"key.snowy.opengui": "Open the snowy gui",
|
"key.snowy.opengui": "Open the snowy gui",
|
||||||
"key.snowy.configkey": "Open the snowy configuration screen",
|
"key.snowy.configkey": "Open the snowy configuration screen",
|
||||||
"snowy.clickbox.misc": "Miscellaneous",
|
"snowy.clickbox.misc": "Miscellaneous",
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
"screen.snowy.config.behavior.zoom.factor": "Facteur de zoom",
|
"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.zoom.smoothcamera": "Caméra fluide pendant le zoom",
|
||||||
"screen.snowy.config.behavior.keystrokes.position": "Position de l'élément keystrokes de l'ATH",
|
"screen.snowy.config.behavior.keystrokes.position": "Position de l'élément keystrokes de l'ATH",
|
||||||
"category.snowy.keycategory": "SnowyGUI",
|
"key.category.snowygui.controls": "SnowyGUI",
|
||||||
"key.snowy.opengui": "Ouvrir l'interface de snowy",
|
"key.snowy.opengui": "Ouvrir l'interface de snowy",
|
||||||
"key.snowy.configkey": "Ouvrir l'écran de configuration de snowy",
|
"key.snowy.configkey": "Ouvrir l'écran de configuration de snowy",
|
||||||
"snowy.clickbox.misc": "Divers",
|
"snowy.clickbox.misc": "Divers",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user