SliderComponent

public class SliderComponent extends GuiComponent(source)

Constructors

Link copied to clipboard
public SliderComponent SliderComponent(GetSetter<Float> value, Float minValue, Float maxValue, Float minStep, Integer width)

Properties

Link copied to clipboard
private Boolean clicked
Link copied to clipboard
private final Float maxValue
Link copied to clipboard
private final Float minStep
Link copied to clipboard
private final Float minValue
Link copied to clipboard
private final GetSetter<Float> value

Functions

Link copied to clipboard
public Unit blur()

Unfocus this element only if this element is selected.

Link copied to clipboard
public T foldChildren<T extends Any>(T initial, @NotNull() @NotNull() BiFunction<@NotNull() GuiComponent, T, T> visitor)

Walk over the direct children of this element. A gui element that composites other gui elements should override this method. By default, the initial element is returned without change.

Link copied to clipboard
public final T foldRecursive<T extends Any>(T initial, @NotNull() @NotNull() BiFunction<@NotNull() GuiComponent, T, T> visitor)

Walk the scene tree of this gui element, including children of children. By default, the visitor is called with only this element.

Link copied to clipboard
public final Boolean getClicked()
Link copied to clipboard
public Integer getHeight()

Get the requested y size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
public final Float getMaxValue()
Link copied to clipboard
public final Float getMinStep()
Link copied to clipboard
public final Float getMinValue()
Link copied to clipboard
public final GetSetter<Float> getValue()
Link copied to clipboard
public Integer getWidth()

Get the requested x size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
public Boolean isFocused()

Test if this element is focused.

Link copied to clipboard
public Boolean isInFocus()

Test if this element is focused, or has a focused child.

Link copied to clipboard
public Boolean keyboardEvent(@NotNull() @NotNull() KeyboardEvent event, @NotNull() @NotNull() GuiImmediateContext context)

Called by the parent renderer.

Link copied to clipboard
public Boolean mouseEvent(MouseEvent mouseEvent, GuiImmediateContext context)

Called by the parent renderer.

Link copied to clipboard

This method is called by the gui context when an element gains focus. This does only get called if this element specifically is being focused.

Link copied to clipboard
public Unit onLostFocus()

This method is called by the gui context when an element loses focus. This does only get called if this element specifically was focused.

Link copied to clipboard
public Unit render(GuiImmediateContext context)

Called by the parent renderer. The GL matrix stack is pre-transformed, so rendering can begin at (0, 0) and should not render beyond what the context says is available.

Link copied to clipboard
public Unit requestFocus()

Call this method to request focus in the current gui context.

Link copied to clipboard
public final Unit setClicked(Boolean clicked)
Link copied to clipboard
public Unit setContext(GuiContext context)
Link copied to clipboard
public Unit setFocus(Boolean shouldFocus)

Focuses or blurs this element depending on shouldFocus

Link copied to clipboard