diff options
Diffstat (limited to 'src/compat/moulconfig/java/ProcessedEditableOptionFirm.kt')
-rw-r--r-- | src/compat/moulconfig/java/ProcessedEditableOptionFirm.kt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/compat/moulconfig/java/ProcessedEditableOptionFirm.kt b/src/compat/moulconfig/java/ProcessedEditableOptionFirm.kt new file mode 100644 index 0000000..c42ad3f --- /dev/null +++ b/src/compat/moulconfig/java/ProcessedEditableOptionFirm.kt @@ -0,0 +1,27 @@ +package moe.nea.firmament.compat.moulconfig + +import io.github.notenoughupdates.moulconfig.Config +import moe.nea.firmament.gui.config.ManagedOption + +abstract class ProcessedEditableOptionFirm<T : Any>( + val managedOption: ManagedOption<T>, + categoryAccordionId: Int, + configObject: Config, +) : ProcessedOptionFirm(categoryAccordionId, configObject) { + val managedConfig = managedOption.element + override fun getDebugDeclarationLocation(): String { + return "FirmamentOption:${managedConfig.name}:${managedOption.propertyName}" + } + + override fun getName(): String { + return managedOption.labelText.string + } + + override fun getDescription(): String { + return "Missing description" // TODO: add description + } + + override fun explicitNotifyChange() { + managedConfig.save() + } +} |