Components

eu.joaocosta.interim.api.Components
See theComponents companion object
trait Components

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Components.type
object InterIm.type

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

type Component[+T] = (inputState: InputState, uiContext: UiContext) => T

Value members

Concrete methods

final def button(id: ItemId, area: Rect, label: String, skin: ButtonSkin): () ?=> Boolean

Button component. Returns true if it's being clicked, false otherwise.

Button component. Returns true if it's being clicked, false otherwise.

Value parameters

label

text label to show on this button

Attributes

final def checkbox(id: ItemId, area: Rect, skin: CheckboxSkin): ComponentWithValue[Boolean]

Checkbox component. Returns true if it's enabled, false otherwise.

Checkbox component. Returns true if it's enabled, false otherwise.

Attributes

final def closeHandle[T](id: ItemId, area: Rect, skin: HandleSkin): ComponentWithValue[PanelState[T]]

Close handle. Closes the panel when clicked.

Close handle. Closes the panel when clicked.

Instead of using this component directly, it can be easier to use eu.joaocosta.interim.api.Panels.window with closable = true.

Attributes

final def moveHandle(id: ItemId, area: Rect, skin: HandleSkin): ComponentWithValue[Rect]

Draggable handle. Returns the moved area.

Draggable handle. Returns the moved area.

It's important that this element moves along with the moved area.

Instead of using this component directly, it can be easier to use eu.joaocosta.interim.api.Panels.window with movable = true.

Attributes

final def radioButton[T](id: ItemId, area: Rect, buttonValue: T, label: String, skin: ButtonSkin): ComponentWithValue[T]

Radio button component. Returns value currently selected.

Radio button component. Returns value currently selected.

Value parameters

buttonValue

the value of this button (value that this button returns when selected)

label

text label to show on this button

Attributes

final def select(id: ItemId, area: Rect, labels: Vector[String], skin: SelectSkin): ComponentWithValue[PanelState[Int]]

Select box component. Returns the index value currently selected inside a PanelState.

Select box component. Returns the index value currently selected inside a PanelState.

Value parameters

labels

text labels for each value

Attributes

final def slider(id: ItemId, area: Rect, min: Int, max: Int, skin: SliderSkin): ComponentWithValue[Int]

Slider component. Returns the current position of the slider, between min and max.

Slider component. Returns the current position of the slider, between min and max.

Value parameters

max

maximum value fr this slider

min

minimum value for this slider

Attributes

final def textInput(id: ItemId, area: Rect, skin: TextInputSkin): ComponentWithValue[String]

Text input component. Returns the current string inputed.

Text input component. Returns the current string inputed.

Attributes