blob: 2bc5cd4479473945d3115a392e168c5fb844c2d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 managedOption.labelDescription.string
}
override fun explicitNotifyChange() {
managedConfig.save()
}
}
|