aboutsummaryrefslogtreecommitdiff
path: root/src/compat/yacl/java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-12 21:38:31 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-12 21:38:31 +0100
commitfc88e54a2e88c87bcfd5e7dbd6866764faa3e503 (patch)
treec5ec7980b67c47ce0d89175cb6ac9a180a94c3f3 /src/compat/yacl/java
parentb774daef5bd961f955d365ce07bd5aa4acb161f4 (diff)
downloadFirmament-fc88e54a2e88c87bcfd5e7dbd6866764faa3e503.tar.gz
Firmament-fc88e54a2e88c87bcfd5e7dbd6866764faa3e503.tar.bz2
Firmament-fc88e54a2e88c87bcfd5e7dbd6866764faa3e503.zip
feat: Add descriptions for config options
Diffstat (limited to 'src/compat/yacl/java')
-rw-r--r--src/compat/yacl/java/YaclIntegration.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compat/yacl/java/YaclIntegration.kt b/src/compat/yacl/java/YaclIntegration.kt
index 239d3a0..9aec501 100644
--- a/src/compat/yacl/java/YaclIntegration.kt
+++ b/src/compat/yacl/java/YaclIntegration.kt
@@ -6,6 +6,7 @@ import dev.isxander.yacl3.api.ButtonOption
import dev.isxander.yacl3.api.ConfigCategory
import dev.isxander.yacl3.api.LabelOption
import dev.isxander.yacl3.api.Option
+import dev.isxander.yacl3.api.OptionDescription
import dev.isxander.yacl3.api.OptionGroup
import dev.isxander.yacl3.api.YetAnotherConfigLib
import dev.isxander.yacl3.api.controller.ControllerBuilder
@@ -69,6 +70,7 @@ class YaclIntegration : FirmamentConfigScreenProvider {
fun <T> createDefaultBinding(function: (Option<T>) -> ControllerBuilder<T>): Option.Builder<T> {
return Option.createBuilder<T>()
.name(managedOption.labelText)
+ .description(OptionDescription.of(managedOption.labelDescription))
.binding(binding as Binding<T>)
.controller { function(it) }
}