Package-level declarations

Observable lists and properties which are used by GUI elements to handle non-static content

Types

Link copied to clipboard
abstract class AbstractGuiList<T, out L : List<T>>(collection: L)

Parent class of the immutable GuiList and mutable GuiMutableList.

Link copied to clipboard
class GuiList<T>(collection: List<T>) : AbstractGuiList<T, List<T>>

Wraps a normal list into a format which can be used by specific gui components - the most prominent one being net.silkmc.silk.igui.GuiCompound. This gui list is immutable.

Link copied to clipboard

Does the same as GuiList, but is mutatable. If you change the content if this list using the mutate function, the gui will update accordingly.

Link copied to clipboard
class GuiProperty<T>(value: T)

A property which can be used to represent mutable state in a gui. You can use the net.silkmc.silk.igui.guiIcon function to specify how the value of this property can be rendered to the gui.

Functions

Link copied to clipboard
fun <T> List<T>.asGuiList(): GuiList<T>

Wraps this list in a GuiList. This list is immutable and therefore static in the gui.

Link copied to clipboard

Wraps this list in a GuiMutableList, which informs gui components about any content updates.

Link copied to clipboard

Creates a new GuiList out of the content of this iterable. This list is immutable and therefore static in the gui.

Link copied to clipboard

Creates a new GuiMutableList, which informs gui components about any content updates, out of the content of this iterable.