diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-12 17:02:08 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-12 17:02:08 +0100 |
commit | b774daef5bd961f955d365ce07bd5aa4acb161f4 (patch) | |
tree | 8e5f8f92593f8c594cc25592901342cc8923cee9 /src/compat/moulconfig/java/ProcessedOptionFirm.kt | |
parent | 9763a4caa44fb6629aae92f3ad696487d962b0d9 (diff) | |
download | Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.tar.gz Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.tar.bz2 Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.zip |
feat: MoulConfig config gui
Diffstat (limited to 'src/compat/moulconfig/java/ProcessedOptionFirm.kt')
-rw-r--r-- | src/compat/moulconfig/java/ProcessedOptionFirm.kt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/compat/moulconfig/java/ProcessedOptionFirm.kt b/src/compat/moulconfig/java/ProcessedOptionFirm.kt new file mode 100644 index 0000000..4d0096c --- /dev/null +++ b/src/compat/moulconfig/java/ProcessedOptionFirm.kt @@ -0,0 +1,39 @@ +package moe.nea.firmament.compat.moulconfig + +import io.github.notenoughupdates.moulconfig.Config +import io.github.notenoughupdates.moulconfig.annotations.SearchTag +import io.github.notenoughupdates.moulconfig.gui.GuiOptionEditor +import io.github.notenoughupdates.moulconfig.processor.ProcessedCategory +import io.github.notenoughupdates.moulconfig.processor.ProcessedOption + +abstract class ProcessedOptionFirm( + private val accordionId: Int, + private val config: Config +) : ProcessedOption { + lateinit var category: ProcessedCategoryFirm + override fun getAccordionId(): Int { + return accordionId + } + + protected abstract fun createEditor(): GuiOptionEditor + val editorInstance by lazy { createEditor() } + + override fun getSearchTags(): Array<SearchTag> { + return emptyArray() + } + + override fun getEditor(): GuiOptionEditor { + return editorInstance + } + + override fun getCategory(): ProcessedCategory { + return category + } + + override fun getConfig(): Config { + return config + } + + override fun explicitNotifyChange() { + } +} |