mirror of
https://github.com/TheWhiteDog9487/WhoProvideThisKeybind.git
synced 2026-09-16 23:10:28 +08:00
🛠️ optimization: 将配置界面的选项拆分成不同的类别
This commit is contained in:
@@ -18,37 +18,45 @@ class ModMenuEntryPoint: ModMenuApi {
|
||||
.name(Component.translatable("config.category.general"))
|
||||
.option {
|
||||
Option.createBuilder<Boolean>()
|
||||
.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<Boolean>()
|
||||
.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<Boolean>()
|
||||
.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<Boolean>()
|
||||
.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<Boolean>()
|
||||
.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() }
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user