CPListBoxModel

org.cosplay.CPListBoxModel

A model for listbox sprite.

Attributes

Source
CPListBoxSprite.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def getElement[T](i: Int): Option[CPListBoxElement[T]]

Gets the model element with given index or None if index is invalid or model is empty..

Gets the model element with given index or None if index is invalid or model is empty..

Attributes

Source
CPListBoxSprite.scala

Gets the index of the currently selected item. Model must always have an element selected unless it is empty.

Gets the index of the currently selected item. Model must always have an element selected unless it is empty.

Attributes

Source
CPListBoxSprite.scala
def getSize: Int

Gets the total number of elements in the model.

Gets the total number of elements in the model.

Attributes

Source
CPListBoxSprite.scala

Concrete methods

def getSelectedValue[T]: Option[T]

A shortcut getter for the value of the selected element or None if the model is empty.

A shortcut getter for the value of the selected element or None if the model is empty.

Attributes

Source
CPListBoxSprite.scala