diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-31 11:59:47 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-31 11:59:47 +0200 |
commit | 816f80f862d2f5de6bc9b0ae84cd6df0da341228 (patch) | |
tree | ee8aaccbaebe5a024549c2530319ed09a02cc4e4 /src/compat/configured/java/ConfigValueNode.kt | |
parent | d2f240ff0ca0d27f417f837e706c781a98c31311 (diff) | |
download | Firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.gz Firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.tar.bz2 Firmament-816f80f862d2f5de6bc9b0ae84cd6df0da341228.zip |
Add configured compat
[no changelog]
Diffstat (limited to 'src/compat/configured/java/ConfigValueNode.kt')
-rw-r--r-- | src/compat/configured/java/ConfigValueNode.kt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/compat/configured/java/ConfigValueNode.kt b/src/compat/configured/java/ConfigValueNode.kt new file mode 100644 index 0000000..df59739 --- /dev/null +++ b/src/compat/configured/java/ConfigValueNode.kt @@ -0,0 +1,37 @@ +package moe.nea.firmament.compat.configured + +import com.mrcrayfish.configured.api.IConfigEntry +import com.mrcrayfish.configured.api.IConfigValue +import net.minecraft.text.Text +import moe.nea.firmament.gui.config.ManagedOption + +class ConfigValueNode(val option: ManagedOption<*>) : IConfigEntry { + override fun getChildren(): List<IConfigEntry> { + return listOf() + } + + override fun isRoot(): Boolean { + return false + } + + override fun isLeaf(): Boolean { + return true + } + + val value = ConfigValue(option) + override fun getValue(): IConfigValue<*>? { + return value + } + + override fun getEntryName(): String { + return option.propertyName + } + + override fun getTooltip(): Text? { + return null + } + + override fun getTranslationKey(): String? { + return option.rawLabelText + } +} |