diff --git a/common/src/main/kotlin/fr/username404/snowygui/misc/AddKeyMaps.kt b/common/src/main/kotlin/fr/username404/snowygui/misc/AddKeyMaps.kt index 84edf2e..b29ccc2 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/misc/AddKeyMaps.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/misc/AddKeyMaps.kt @@ -6,6 +6,7 @@ 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 @@ -16,12 +17,14 @@ object AddKeyMaps { @JvmOverloads internal fun mkMap( translationSuffix: String, - key: Int, category: String = "keycategory", + key: Int, category: String = "controls", lambda: privateLambda = null ): Pair = KeyMapping( "key.$prefix.$translationSuffix", InputConstants.Type.KEYSYM, 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 val list: MutableMap = with(Minecraft.getInstance()) { diff --git a/common/src/main/resources/assets/snowygui/lang/en_us.json b/common/src/main/resources/assets/snowygui/lang/en_us.json index 2d1b43d..f70bee2 100644 --- a/common/src/main/resources/assets/snowygui/lang/en_us.json +++ b/common/src/main/resources/assets/snowygui/lang/en_us.json @@ -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", - "category.snowy.keycategory": "SnowyGUI", + "key.category.snowygui.controls": "SnowyGUI", "key.snowy.opengui": "Open the snowy gui", "key.snowy.configkey": "Open the snowy configuration screen", "snowy.clickbox.misc": "Miscellaneous", diff --git a/common/src/main/resources/assets/snowygui/lang/fr_fr.json b/common/src/main/resources/assets/snowygui/lang/fr_fr.json index db4e20e..cfb2bc1 100644 --- a/common/src/main/resources/assets/snowygui/lang/fr_fr.json +++ b/common/src/main/resources/assets/snowygui/lang/fr_fr.json @@ -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", - "category.snowy.keycategory": "SnowyGUI", + "key.category.snowygui.controls": "SnowyGUI", "key.snowy.opengui": "Ouvrir l'interface de snowy", "key.snowy.configkey": "Ouvrir l'écran de configuration de snowy", "snowy.clickbox.misc": "Divers",