Companion

object Companion

This companion object provides extension functions for the Setting classes.

Functions

Link copied to clipboard
fun <K : Setting<*>> K.withDependency(dependency: () -> Boolean): K

Set a dependency which has to be fulfilled for this Setting to show up in the GUI.

Link copied to clipboard
fun <K : Setting<T>, T> K.withInputTransform(transform: (input: T) -> T): K
fun <K : Setting<T>, T> K.withInputTransform(transform: (input: T, setting: K) -> T): K

Can be used to set a setting specific restraint / extra action when setting the new value.