ConfigGroup

class ConfigGroup @JvmOverloads constructor(groupName: String = "", decoration: Decorated? = null, offsetX: Int? = null, offsetY: Int? = null) : TranslatableEntry, EntryAnchor, EntryCreator, EntryPermissible, EntryTransient

Defines the start of a config group

Groups organize a grouping of settings into one unit that can be collapsed and expanded in the GUI

Author

fzzyhmstrs

Since

0.6.0

Constructors

Link copied to clipboard
constructor(groupName: String = "", decoration: Decorated? = null, offsetX: Int? = null, offsetY: Int? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
annotation class Pop

Marks the end of a group. Any group that is created by adding a ConfigGroup should be terminated by adding a Pop on the last entry in that group. This annotation is repeatable, Annotate a setting multiple times if it is the end of multiple nested groups simultaneously.

Functions

Link copied to clipboard
open override fun anchorEntry(anchor: EntryAnchor.Anchor): EntryAnchor.Anchor
Link copied to clipboard
open override fun anchorId(scope: String): String
Link copied to clipboard
open override fun createEntry(context: EntryCreator.CreatorContext): List<EntryCreator.Creator>

Builds one or more DynamicListWidget.Entry from provided CreatorContext. These entries are used to build config GUIs, being the "building block" of the settings list.

Link copied to clipboard
open fun description(fallback: String? = null): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun descriptionKey(): String

translation key of this Translatable's description. the "description" in-game, the descriptions Enchantment Descriptions adds to enchantment tooltips are a good example.

Link copied to clipboard
open override fun getEntryKey(): String
Link copied to clipboard

Whether this Translatable has a valid description

Link copied to clipboard
open fun hasPrefix(): Boolean

Whether this Translatable has a valid prefix

Link copied to clipboard

Whether this Translatable has a valid translation

Link copied to clipboard
open fun prefix(fallback: String? = null): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun prefixKey(): String

translation key of this Translatable's inline prefix text. Unlike descriptions, which are usually displayed in-tooltips, prefixes are displayed inline in the config screen itself

Link copied to clipboard
open override fun prepare(scope: String, groups: LinkedList<String>, annotations: List<Annotation>, globalAnnotations: List<Annotation>)

Called in the prepare stage of screen building to perform any necessary pre-entry-creation tasks.

Link copied to clipboard
open override fun setEntryKey(key: String)
Link copied to clipboard
open fun translation(fallback: String? = null): MutableText

The translated Text name from the translationKey. Falls back to the implementing classes Simple Name (non-translated)

Link copied to clipboard
open override fun translationKey(): String

translation key of this Translatable. the "name" in-game