From dc2b661d511a787fb13afdb237f7581a8eafe48b Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Wed, 16 Sep 2026 16:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20optimization:=20?= =?UTF-8?q?=E5=B0=86=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2=E7=9A=84=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=8B=86=E5=88=86=E6=88=90=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/ModMenuEntryPoint.kt | 32 ++++++++++++------- .../whoprovidethiskeybind/lang/en_us.json | 22 +++++++------ .../whoprovidethiskeybind/lang/zh_cn.json | 22 +++++++------ 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt b/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt index 69690f0..ecb37bd 100644 --- a/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt +++ b/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt @@ -18,37 +18,45 @@ class ModMenuEntryPoint: ModMenuApi { .name(Component.translatable("config.category.general")) .option { Option.createBuilder() - .name(Component.translatable("option.ModEnabled")) - .description { OptionDescription.of(Component.translatable("option.ModEnabled.description") ) } + .name(Component.translatable("option.general.ModEnabled")) + .description { OptionDescription.of(Component.translatable("option.general.ModEnabled.description") ) } .binding( true, { SettingsInstance.ModEnabled }, { SettingsInstance.ModEnabled = it } ) .controller(BooleanControllerBuilder::create ) .build() } + .build() } + .category { + ConfigCategory.createBuilder() + .name(Component.translatable("config.category.feature")) .option { Option.createBuilder() - .name(Component.translatable("option.ShowModID")) - .description { OptionDescription.of(Component.translatable("option.ShowModID.description") ) } + .name(Component.translatable("option.feature.ShowModID")) + .description { OptionDescription.of(Component.translatable("option.feature.ShowModID.description") ) } .binding( false, { SettingsInstance.ShowModID }, { SettingsInstance.ShowModID = it } ) .controller(BooleanControllerBuilder::create ) .build() } .option { Option.createBuilder() - .name(Component.translatable("option.ShowKeybindID")) - .description { OptionDescription.of(Component.translatable("option.ShowKeybindID.description") ) } + .name(Component.translatable("option.feature.ShowKeybindID")) + .description { OptionDescription.of(Component.translatable("option.feature.ShowKeybindID.description") ) } .binding( false, { SettingsInstance.ShowKeybindID }, { SettingsInstance.ShowKeybindID = it } ) .controller(BooleanControllerBuilder::create ) .build() } .option { Option.createBuilder() - .name(Component.translatable("option.ShowDebugInfo")) - .description { OptionDescription.of(Component.translatable("option.ShowDebugInfo.description") ) } - .binding( false, { SettingsInstance.ShowDebugInfo }, { SettingsInstance.ShowDebugInfo = it } ) + .name(Component.translatable("option.feature.ShowFilePath")) + .description { OptionDescription.of(Component.translatable("option.feature.ShowFilePath.description") ) } + .binding( false, { SettingsInstance.ShowFilePath }, { SettingsInstance.ShowFilePath = it } ) .controller(BooleanControllerBuilder::create ) .build() } + .build() } + .category { + ConfigCategory.createBuilder() + .name(Component.translatable("config.category.debug")) .option { Option.createBuilder() - .name(Component.translatable("option.ShowFilePath")) - .description { OptionDescription.of(Component.translatable("option.ShowFilePath.description") ) } - .binding( false, { SettingsInstance.ShowFilePath }, { SettingsInstance.ShowFilePath = it } ) + .name(Component.translatable("option.debug.ShowDebugInfo")) + .description { OptionDescription.of(Component.translatable("option.debug.ShowDebugInfo.description") ) } + .binding( false, { SettingsInstance.ShowDebugInfo }, { SettingsInstance.ShowDebugInfo = it } ) .controller(BooleanControllerBuilder::create ) .build() } .build() } diff --git a/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json b/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json index 93bb003..90786fe 100644 --- a/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json +++ b/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json @@ -5,16 +5,18 @@ "link.blog": "TheWhiteDog9487's Blog", "title.config": "Who Provides This Keybind?", "config.category.general": "General", - "option.ModEnabled": "Enable Mod Functionality", - "option.ModEnabled.description": "Changes take effect immediately after modification and save without restarting the game", - "option.ShowModID": "Show Mod ID", - "option.ShowModID.description": "Display the Mod ID of the provider in the tooltip", - "option.ShowKeybindID": "Show Keybind ID", - "option.ShowKeybindID.description": "Display the keybind's own ID in the tooltip", - "option.ShowDebugInfo": "Show Debug Info", - "option.ShowDebugInfo.description": "This information is used to troubleshoot issues related to this mod; it generally does not need to be enabled", - "option.ShowFilePath": "Show File Path", - "option.ShowFilePath.description": "Display the mod file path in the information", + "config.category.feature": "Feature", + "config.category.debug": "Debug", + "option.general.ModEnabled": "Enable Mod Functionality", + "option.general.ModEnabled.description": "Changes take effect immediately after modification and save without restarting the game", + "option.feature.ShowModID": "Show Mod ID", + "option.feature.ShowModID.description": "Display the Mod ID of the provider in the tooltip", + "option.feature.ShowKeybindID": "Show Keybind ID", + "option.feature.ShowKeybindID.description": "Display the keybind's own ID in the tooltip", + "option.feature.ShowFilePath": "Show File Path", + "option.feature.ShowFilePath.description": "Display the mod file path in the information", + "option.debug.ShowDebugInfo": "Show Debug Info", + "option.debug.ShowDebugInfo.description": "This information is used to troubleshoot issues related to this mod; it generally does not need to be enabled", "tooltip.provided_by": "Provided by: %s", "tooltip.provider_mod_id": "Provider Mod ID: %s", "tooltip.key_id": "Keybind ID: %s", diff --git a/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json b/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json index 01e1f09..a253471 100644 --- a/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json +++ b/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json @@ -5,16 +5,18 @@ "link.blog": "TheWhiteDog9487的博客", "title.config": "谁在提供这个键位?", "config.category.general": "通用", - "option.ModEnabled": "是否启用模组功能", - "option.ModEnabled.description": "无需重启游戏,修改并保存后立刻生效", - "option.ShowModID": "是否显示Mod ID", - "option.ShowModID.description": "在提示信息中显示提供该按键的Mod的ID", - "option.ShowKeybindID": "是否显示键位ID", - "option.ShowKeybindID.description": "在提示信息中显示该按键本身的ID", - "option.ShowDebugInfo": "是否显示调试信息", - "option.ShowDebugInfo.description": "这些信息用于出现和本Mod相关的问题时进行排查,一般情况下不需要开启", - "option.ShowFilePath": "是否显示文件路径", - "option.ShowFilePath.description": "在信息中显示Mod的文件路径", + "config.category.feature": "功能", + "config.category.debug": "调试", + "option.general.ModEnabled": "是否启用模组功能", + "option.general.ModEnabled.description": "无需重启游戏,修改并保存后立刻生效", + "option.feature.ShowModID": "是否显示Mod ID", + "option.feature.ShowModID.description": "在提示信息中显示提供该按键的Mod的ID", + "option.feature.ShowKeybindID": "是否显示键位ID", + "option.feature.ShowKeybindID.description": "在提示信息中显示该按键本身的ID", + "option.feature.ShowFilePath": "是否显示文件路径", + "option.feature.ShowFilePath.description": "在信息中显示Mod的文件路径", + "option.debug.ShowDebugInfo": "是否显示调试信息", + "option.debug.ShowDebugInfo.description": "这些信息用于出现和本Mod相关的问题时进行排查,一般情况下不需要开启", "tooltip.provided_by": "提供者:%s", "tooltip.provider_mod_id": "提供者ID:%s", "tooltip.key_id": "键位ID:%s",