Package-level declarations

Functions

Link copied to clipboard
inline fun Table.addCollapser(shown: Boolean = true, background: Drawable = Styles.none, constructor: Table.() -> Unit = {}): Cell<Collapser>

Adds a collapser constructed by a lambda to the existing table and returns the created cell

inline fun Table.addCollapser(crossinline shown: () -> Boolean = { true }, background: Drawable = Styles.none, animate: Boolean = false, constructor: Table.() -> Unit = {}): Cell<Collapser>

Adds a collapser constructed by a lambda to the existing table and returns the created cell. Whether it's shown is determined by the lambda.

Link copied to clipboard
fun Table.addImage(drawable: TextureRegion, scaling: Scaling = Scaling.stretch): Cell<Image>
fun Table.addImage(drawable: Drawable?, scaling: Scaling = Scaling.stretch): Cell<Image>

Adds a constant image to the table and returns the created cell

inline fun Table.addImage(crossinline provider: () -> Drawable?, scaling: Scaling = Scaling.stretch): Cell<Image>

Adds a dynamic image to the table and returns the created cell

Link copied to clipboard
fun Table.addLabel(text: CharSequence, style: Label.LabelStyle = Styles.defaultLabel, wrap: Boolean = false, ellipsis: String? = null, align: Int = Align.center): Cell<Label>

Adds a constant label to the table and returns the created cell

inline fun Table.addLabel(crossinline provider: () -> CharSequence, style: Label.LabelStyle = Styles.defaultLabel, wrap: Boolean = false, ellipsis: String? = null, align: Int = Align.center): Cell<Label>

Adds a dynamic label to the table and returns the created cell

Link copied to clipboard
inline fun Table.addLabels(vararg elems: Any?, style: Label.LabelStyle = Styles.defaultLabel, wrap: Boolean = false, ellipsis: String? = null, align: Int = Align.center, block: (Cell<Label>) -> Unit = {})

Adds multiple labels, either static or dynamic ones.

Link copied to clipboard
fun Table.addPrefSpace(spaceWidth: Float = 1.0f, spaceHeight: Float = 1.0f): Cell<Element>
Link copied to clipboard
fun Table.addSpace(width: Float = 1.0f, height: Float = 1.0f): Cell<Element>

Adds a simple Element that occupies the providen size.

Link copied to clipboard
fun Table.addStack(vararg elements: Element): Cell<Stack>

Adds an element stack that contains the specified elements and returns the created cell

inline fun Table.addStack(constructor: Stack.() -> Unit): Cell<Stack>

Adds a stack constructed by a lambda and returns the created cell

Link copied to clipboard
inline fun Group.addTable(background: Drawable = Styles.none, constructor: Table.() -> Unit = {}): Table

Adds a table to the group, passes it to the lambda and returns the created table.

inline fun Table.addTable(background: Drawable = Styles.none, constructor: Table.() -> Unit = {}): Cell<Table>

Adds a table constructed by a lambda to the existing table and returns the created table cell

Link copied to clipboard
inline fun Table.buttonGroup(background: Drawable = Styles.none, constructor: Table.(ButtonGroup<Button>) -> Unit): Cell<Table>

Creates a table and a button group, calls the constructor and passes this table to it, adds all created buttons into the same group. Adds the table and returns the created cell.

Link copied to clipboard
inline fun createBaseDialog(title: String = "", style: Dialog.DialogStyle = Styles.defaultDialog, addCloseButton: Boolean = false, closeOnBack: Boolean = true, crossinline configurator: Table.(BaseDialog) -> Unit): BaseDialog

Similar to createDialog, but creates a BaseDialog.

Link copied to clipboard
inline fun createDialog(title: String = "", style: Dialog.DialogStyle = Styles.defaultDialog, addCloseButton: Boolean = false, closeOnBack: Boolean = true, constructor: (title: String, style: Dialog.DialogStyle) -> Dialog = { t, s -> Dialog(t, s) }, configurator: Table.(Dialog) -> Unit): Dialog

Creates a dialog using constructor and passes it to the configurator lambda for it to configure the dialog.

Link copied to clipboard
inline fun createTable(background: Drawable = Styles.none, constructor: Table.() -> Unit = {}): Table

Creates a table constructed by a lambda

Link copied to clipboard
inline fun createWrapper(crossinline width: Table.(originalWidth: Float) -> Float = { it }, crossinline height: Table.(originalHeight: Float) -> Float = { it }, crossinline builder: Table.() -> Unit): Table

Creates a wrapper table with dynamic preferred size and returns it. The size of the table is dynamic and is determined by the output of the width and height lambdas.

Link copied to clipboard
inline fun Table.customButton(constructor: Button.() -> Unit, style: Button.ButtonStyle = Styles.defaultb, crossinline onclick: Button.() -> Unit = {}): Cell<Button>

Adds a custom button constructed by a lambda and returns the created cell

Link copied to clipboard
inline fun Table.hider(crossinline hideHorizontal: Table.() -> Boolean = { false }, crossinline hideVertical: Table.() -> Boolean = { false }, crossinline builder: Table.() -> Unit): Cell<Table>

Adds a table that returns 0 if its preferred width / height if the respective lambda returns true, or it's real preferred size otherwise.

Link copied to clipboard
fun Table.hsplitter(color: Color = Color.white, padTop: Float = 5.0f, padBottom: Float = padTop): Cell<Image>

Creates a horizontal splitter and returns the created cell. This method automatically creates two rows.

Link copied to clipboard
inline fun Table.imageButton(image: TextureRegion?, style: ImageButton.ImageButtonStyle = Styles.defaulti, crossinline onclick: ImageButton.() -> Unit = {}): Cell<ImageButton>
inline fun Table.imageButton(image: Drawable?, style: ImageButton.ImageButtonStyle = Styles.defaulti, crossinline onclick: ImageButton.() -> Unit = {}): Cell<ImageButton>

Adds an image button with an optional onclick listener, returns the created cell

inline fun Table.imageButton(crossinline provider: () -> Drawable?, style: ImageButton.ImageButtonStyle = Styles.defaulti, crossinline onclick: ImageButton.() -> Unit = {}): Cell<ImageButton>

Adds an image button with a dynamic image and an optional onclick listener, returns the created cell.

Link copied to clipboard
inline fun Table.imageToggle(image: Drawable?, toggleableStyle: Button.ButtonStyle = Styles.clearTogglei, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Simmilar to toggleButton but adds a constant image

inline fun Table.imageToggle(crossinline image: (Boolean) -> Drawable?, toggleableStyle: Button.ButtonStyle = Styles.clearTogglei, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Simmilar to toggleButton but adds a dynamic image

inline fun Table.imageToggle(imageEnabled: Drawable?, imageDisabled: Drawable?, toggleableStyle: Button.ButtonStyle = Styles.togglet, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Adds an image toggle button and returns the created cell. The toggle uses imageEnabled or imageDisabled depending on whether it's toggled on or off.

Link copied to clipboard
inline fun Table.limitedScrollPane(limitW: Boolean = true, limitH: Boolean = limitW, style: ScrollPane.ScrollPaneStyle = Styles.defaultPane, constructor: Table.(ScrollPane) -> Unit): Cell<ScrollPane>

Creates a limited scroll pane constructed by a lambda and returns the created cell.

Link copied to clipboard
fun Table.menuButton(icon: Drawable?, text: String, style: TextButton.TextButtonStyle, align: Int = Align.center, wrap: Boolean = false, ellipsis: String? = null): Cell<MenuButton>

Adds a MenuButton to the table and returns the created cell.

fun Table.menuButton(icon: MenuButton.() -> Drawable?, text: MenuButton.() -> String, style: TextButton.TextButtonStyle, align: Int = Align.center, wrap: Boolean = false, ellipsis: String? = null): Cell<MenuButton>

Adds a dynamic MenuButton to the table and returns the created cell.

Link copied to clipboard
inline fun Table.pager(vertical: Boolean = false, constructor: TablePager.() -> Unit): Cell<TablePager>

Adds a table pager constructed by a lambda and returns the created cell.

Link copied to clipboard
fun Table.scrollPane(style: ScrollPane.ScrollPaneStyle = Styles.defaultPane, element: Element): Cell<ScrollPane>

Creates a scroll pane containing the providen element and returns the created cell

inline fun Table.scrollPane(style: ScrollPane.ScrollPaneStyle = Styles.defaultPane, constructor: Table.(ScrollPane) -> Unit): Cell<ScrollPane>

Creates a scroll pane containing a table constructed by a lambda and returns the created cell

Link copied to clipboard
inline fun Table.textArea(text: String = "", style: TextField.TextFieldStyle = Styles.areaField, crossinline onchange: TextArea.(String) -> Unit = {}): Cell<TextArea>

Adds a multi-line TextArea to the table and returns thencreated cell.

Link copied to clipboard
inline fun Table.textButton(crossinline provider: () -> String, style: TextButton.TextButtonStyle = Styles.defaultt, wrap: Boolean = false, align: Int? = null, ellipsis: String? = null, crossinline onclick: TextButton.() -> Unit = {}): Cell<TextButton>

Adds a text button with a dynamic label and an optional onclick listener, returns the created cell

inline fun Table.textButton(text: String, style: TextButton.TextButtonStyle = Styles.defaultt, wrap: Boolean = false, align: Int? = null, ellipsis: String? = null, crossinline onclick: TextButton.() -> Unit = {}): Cell<TextButton>

Adds a text button with an optional onclick listener, returns the created cell

Link copied to clipboard
inline fun Table.textField(text: String = "", style: TextField.TextFieldStyle = Styles.defaultField, crossinline onchange: TextField.(String) -> Unit = {}): Cell<TextField>

Adds a single-line TextField to the table and returns the created cell.

Link copied to clipboard
inline fun Table.textToggle(crossinline text: (Boolean) -> String, toggleableStyle: Button.ButtonStyle = Styles.togglet, wrap: Boolean = false, align: Int? = null, ellipsis: String? = null, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Simmilar to toggleButton but adds a dynamic label

inline fun Table.textToggle(text: String, toggleableStyle: Button.ButtonStyle = Styles.togglet, wrap: Boolean = false, align: Int? = null, ellipsis: String? = null, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Simmilar to toggleButton but adds a constant label

inline fun Table.textToggle(textEnabled: String, textDisabled: String, toggleableStyle: Button.ButtonStyle = Styles.togglet, wrap: Boolean = false, align: Int? = null, ellipsis: String? = null, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Adds a text toggle button and returns the created cell. The toggle uses textEnabled or textDisabled depending on whether it's toggled on or off.

Link copied to clipboard
inline fun Table.toggleButton(constructor: Button.() -> Unit, toggleableStyle: Button.ButtonStyle = Styles.togglet, crossinline ontoggle: Button.(Boolean) -> Unit = {}): Cell<ToggleButton>

Creates a toggle button constructed by a lambda and returns the created cell. ontoggle is called whenever the button is toggled.

Link copied to clipboard
fun Table.vsplitter(color: Color = Color.white, padLeft: Float = 5.0f, padRight: Float = padLeft): Cell<Image>

Creates a vertical splitter and returns the created cell.

Link copied to clipboard
inline fun Table.wrapper(crossinline width: Table.(originalWidth: Float) -> Float = { it }, crossinline height: Table.(originalHeight: Float) -> Float = { it }, crossinline builder: Table.() -> Unit): Cell<Table>

Adds a wrapper table with dynamic preferred size and returns the created cell. The size of the table is dynamic and is determined by the output of the width and height lambdas.