ContentBuilder

class ContentBuilder(context: EntryCreator.CreatorContext, actionWidgets: List<AbstractDecorationWidget>)

Builds content information for constructing a ConfigEntry

Author

fzzyhmstrs

Since

0.6.0

Parameters

context

EntryCreator.CreatorContext creator context used by this builder for a variety of information

actionWidgets

List$lt;AbstractDecorationWidget$gt; decorations drawn on the left side of the screen to provide usage alerts (requires restart etc.). the creator context provides a list of actions that can be converted into ActionDecorationWidget for this purpose. See ActionDecorationWidget.setting and other methods for details.

Constructors

Link copied to clipboard
constructor(context: EntryCreator.CreatorContext, actions: Set<Action>)

Builds content information for constructing a ConfigEntry

constructor(context: EntryCreator.CreatorContext)

Builds content information for constructing a ConfigEntry. Automatically uses the set of Action inside the context to build action widgets.

constructor(context: EntryCreator.CreatorContext, actionWidgets: List<AbstractDecorationWidget>)

Types

Link copied to clipboard

Built entry content for construction of a ConfigEntry. These values are used internally by the entry during instantiation.

Functions

Link copied to clipboard

Builds a BuildResult for construction of an Entry

Link copied to clipboard

A map of context actions for the entry to use in context handling. These are the right-click and keybind actions relevant to the setting.

Link copied to clipboard
fun decoration(decoration: Decorated, offsetX: Int = 0, offsetY: Int = 0): ConfigEntry.ContentBuilder

Applies a decoration to this entry.

Link copied to clipboard

Modify the content area of the entry. The content area is the "button" area of a standard entry layout. It is common to apply one widget to this area, which is the entire "setting button" for the entry.

Link copied to clipboard

Modify the main layout of the entry. This should only be used if the structure of the entry needs to change substantially. For most circumstances, layoutContent is proper

Link copied to clipboard

Defines a starting visibility for the entry. Default is DynamicListWidget.Visibility.VISIBLE