Fix controls category name

Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2026-02-09 00:11:56 +01:00
parent 21c53e496a
commit ca47028e7e
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
3 changed files with 7 additions and 4 deletions

View File

@ -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, privateLambda> = 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<KeyMapping, privateLambda> = with(Minecraft.getInstance()) {

View File

@ -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",

View File

@ -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",