ColorSelectComponent

Constructors

Link copied to clipboard
constructor(x: Int, y: Int, initialColour: String, colourChangedCallback: Consumer<String>, closeCallback: Runnable)
constructor(x: Int, y: Int, initialColour: String, colourChangedCallback: Consumer<String>, closeCallback: Runnable, opacitySlider: Boolean, valueSlider: Boolean)

Functions

Link copied to clipboard
open fun blur()
Unfocus this element only if this element is selected.
Link copied to clipboard
open fun <T> foldChildren(initial: T, @NotNull visitor: @NotNull BiFunction<@NotNull GuiComponent, T, T>): T
Walk over the direct children of this element.
Link copied to clipboard
fun <T> foldRecursive(initial: T, @NotNull visitor: @NotNull BiFunction<@NotNull GuiComponent, T, T>): T
Walk the scene tree of this gui element, including children of children.
Link copied to clipboard
open fun getHeight(): Int
Get the requested y size for this element.
Link copied to clipboard
open fun getWidth(): Int
Get the requested x size for this element.
Link copied to clipboard
open fun isFocused(): Boolean
Test if this element is focused.
Link copied to clipboard
open fun isInFocus(): Boolean
Test if this element is focused, or has a focused child.
Link copied to clipboard
open fun keyboardEvent(@NotNull event: @NotNull KeyboardEvent, @NotNull context: @NotNull GuiImmediateContext): Boolean
Called by the parent renderer.
Link copied to clipboard
open fun mouseEvent(@NotNull mouseEvent: @NotNull MouseEvent, @NotNull context: @NotNull GuiImmediateContext): Boolean
Called by the parent renderer.
Link copied to clipboard
open fun onGainedFocus()
This method is called by the gui context when an element gains focus.
Link copied to clipboard
open fun onLostFocus()
This method is called by the gui context when an element loses focus.
Link copied to clipboard
open fun render(@NotNull context: @NotNull GuiImmediateContext)
Called by the parent renderer.
Link copied to clipboard
open fun requestFocus()
Call this method to request focus in the current gui context.
Link copied to clipboard
open fun setContext(context: GuiContext)
Link copied to clipboard
open fun setFocus(shouldFocus: Boolean)
Focuses or blurs this element depending on shouldFocus
Link copied to clipboard