KContainer

class KContainer<T : Actor>(actor: T? = null) : Container<T> , KGroup

Extends Container API with type-safe widget builders. Note that this widget may store only a single child.

Constructors

Link copied to clipboard
constructor(actor: T? = null)

Properties

Link copied to clipboard
val actions: Array<Action>
Link copied to clipboard
@Null
@get:Null
var actor: T
Link copied to clipboard
val align: Int
Link copied to clipboard
@Null
@get:Null
var background: Drawable
Link copied to clipboard
val captureListeners: DelayedRemovalArray<EventListener>
Link copied to clipboard
val children: SnapshotArray<Actor>
Link copied to clipboard
Link copied to clipboard
var color: Color
Link copied to clipboard
@Null
@get:Null
var cullingArea: Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val listeners: DelayedRemovalArray<EventListener>
Link copied to clipboard
@Null
@get:Null
var name: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Null
@get:Null
var parent: Group
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Null
@get:Null
var stage: Stage
Link copied to clipboard
var touchable: Touchable
Link copied to clipboard
Link copied to clipboard
@Null
@get:Null
var userObject: Any
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var x: Float
Link copied to clipboard
var y: Float

Functions

Link copied to clipboard
open override fun act(p0: Float)
Link copied to clipboard
inline fun <S, A : Actor> KWidget<S>.actor(actor: A, init: A.(S) -> Unit = {}): A

Utility function for adding existing actors to the group with a type-safe builder init block. Mostly for internal use.

Link copied to clipboard
open fun addAction(p0: Action)
Link copied to clipboard
open override fun addActor(actor: Actor?)

Matches Group.addActor API.

Link copied to clipboard
open override fun addActorAfter(p0: Actor, p1: Actor)
Link copied to clipboard
open override fun addActorAt(p0: Int, p1: Actor)
Link copied to clipboard
open override fun addActorBefore(p0: Actor, p1: Actor)
Link copied to clipboard
open fun addCaptureListener(p0: EventListener): Boolean
Link copied to clipboard
open fun addListener(p0: EventListener): Boolean
Link copied to clipboard
open fun align(p0: Int): Container<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun background(@Null p0: Drawable): Container<T>
Link copied to clipboard
open fun bottom(): Container<T>
Link copied to clipboard
inline fun <S> KWidget<S>.button(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KButton.(S) -> Unit = {}): KButton
Link copied to clipboard
inline fun <S> KWidget<S>.buttonGroup(minCheckedCount: Int, maxCheckedCount: Int, skin: Skin = Scene2DSkin.defaultSkin, init: KButtonTable.(S) -> Unit = {}): KButtonTable
Link copied to clipboard
open fun center(): Container<T>
Link copied to clipboard
inline fun <S> KWidget<S>.checkBox(text: String, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KCheckBox.(S) -> Unit = {}): KCheckBox
Link copied to clipboard
open override fun clear()
open fun clear(p0: Boolean)
Link copied to clipboard
open fun clearActions()
Link copied to clipboard
open fun clearChildren()
open fun clearChildren(p0: Boolean)
Link copied to clipboard
open fun clearListeners()
Link copied to clipboard
open fun clip(): Container<T>
open fun clip(p0: Boolean): Container<T>
Link copied to clipboard
open fun clipBegin(): Boolean
open fun clipBegin(p0: Float, p1: Float, p2: Float, p3: Float): Boolean
Link copied to clipboard
open fun clipEnd()
Link copied to clipboard
inline fun <S> KWidget<S>.container(init: KContainer<Actor>.(S) -> Unit = {}): KContainer<Actor>

inline fun <S, A : Actor> KWidget<S>.container(actor: A, init: KContainer<A>.(S) -> Unit = {}): KContainer<A>

Use this container method variant for customly built actors that you want to keep in a Container.

Link copied to clipboard
open fun debug(): Actor
Link copied to clipboard
open fun debugAll(): Group
Link copied to clipboard
open override fun draw(p0: Batch, p1: Float)
Link copied to clipboard
open override fun drawDebug(p0: ShapeRenderer)
Link copied to clipboard
open fun fill(): Container<T>
open fun fill(p0: Boolean): Container<T>
open fun fill(p0: Boolean, p1: Boolean): Container<T>
open fun fill(p0: Float, p1: Float): Container<T>
Link copied to clipboard
open fun fillX(): Container<T>
Link copied to clipboard
open fun fillY(): Container<T>
Link copied to clipboard
@Null
open fun <T : Actor> findActor(p0: String): T
Link copied to clipboard
open fun fire(p0: Event): Boolean
Link copied to clipboard
@Null
open fun <T : Actor> firstAscendant(p0: Class<T>): T
Link copied to clipboard
open fun getChild(p0: Int): Actor
Link copied to clipboard
open override fun getMaxHeight(): Float
Link copied to clipboard
open fun getMaxHeightValue(): Value
Link copied to clipboard
open override fun getMaxWidth(): Float
Link copied to clipboard
open fun getMaxWidthValue(): Value
Link copied to clipboard
open override fun getMinHeight(): Float
Link copied to clipboard
open fun getMinHeightValue(): Value
Link copied to clipboard
open override fun getMinWidth(): Float
Link copied to clipboard
open fun getPadBottom(): Float
Link copied to clipboard
open fun getPadBottomValue(): Value
Link copied to clipboard
open fun getPadLeft(): Float
Link copied to clipboard
open fun getPadLeftValue(): Value
Link copied to clipboard
open fun getPadRight(): Float
Link copied to clipboard
open fun getPadRightValue(): Value
Link copied to clipboard
open fun getPadTop(): Float
Link copied to clipboard
open fun getPadTopValue(): Value
Link copied to clipboard
open fun getPadX(): Float
Link copied to clipboard
open fun getPadY(): Float
Link copied to clipboard
open override fun getPrefHeight(): Float
Link copied to clipboard
open fun getPrefHeightValue(): Value
Link copied to clipboard
open override fun getPrefWidth(): Float
Link copied to clipboard
open fun getPrefWidthValue(): Value
Link copied to clipboard
open fun getRight(): Float
Link copied to clipboard
open fun getTop(): Float
Link copied to clipboard
open fun getX(p0: Int): Float
Link copied to clipboard
open fun getY(p0: Int): Float
Link copied to clipboard
open fun getZIndex(): Int
Link copied to clipboard
open fun hasActions(): Boolean
Link copied to clipboard
open fun hasChildren(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun hasParent(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun height(p0: Value): Container<T>
open fun height(p0: Float): Container<T>
Link copied to clipboard
@Null
open override fun hit(p0: Float, p1: Float, p2: Boolean): Actor
Link copied to clipboard
Link copied to clipboard
inline fun <S> KWidget<S>.image(texture: Texture, init: Image.(S) -> Unit = {}): Image
inline fun <S> KWidget<S>.image(ninePatch: NinePatch, init: Image.(S) -> Unit = {}): Image
inline fun <S> KWidget<S>.image(textureRegion: TextureRegion, init: Image.(S) -> Unit = {}): Image
inline fun <S> KWidget<S>.image(drawable: Drawable? = null, init: Image.(S) -> Unit = {}): Image
inline fun <S> KWidget<S>.image(drawableName: String, skin: Skin = Scene2DSkin.defaultSkin, init: Image.(S) -> Unit = {}): Image
Link copied to clipboard
inline fun <S> KWidget<S>.imageButton(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KImageButton.(S) -> Unit = {}): KImageButton
Link copied to clipboard
inline fun <S> KWidget<S>.imageTextButton(text: String, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KImageTextButton.(S) -> Unit = {}): KImageTextButton
Link copied to clipboard
open override fun invalidate()
Link copied to clipboard
open override fun invalidateHierarchy()
Link copied to clipboard
open fun isAscendantOf(p0: Actor): Boolean
Link copied to clipboard
open fun isDescendantOf(p0: Actor): Boolean
Link copied to clipboard
open fun isTouchable(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <S> KWidget<S>.label(text: CharSequence, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: Label.(S) -> Unit = {}): Label
Link copied to clipboard
open override fun layout()
Link copied to clipboard
open fun left(): Container<T>
Link copied to clipboard
inline fun <I> KWidget<*>.listWidget(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KListWidget<I>.() -> Unit = {}): KListWidget<I>
Link copied to clipboard
fun <I> KWidget<*>.listWidgetOf(items: Array<I>? = null, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin): KListWidget<I>
Link copied to clipboard
open fun localToActorCoordinates(p0: Actor, p1: Vector2): Vector2
Link copied to clipboard
open fun localToAscendantCoordinates(@Null p0: Actor, p1: Vector2): Vector2
Link copied to clipboard
open fun localToDescendantCoordinates(p0: Actor, p1: Vector2): Vector2
Link copied to clipboard
open fun localToParentCoordinates(p0: Vector2): Vector2
Link copied to clipboard
open fun localToScreenCoordinates(p0: Vector2): Vector2
Link copied to clipboard
open fun localToStageCoordinates(p0: Vector2): Vector2
Link copied to clipboard
open fun maxHeight(p0: Value): Container<T>
open fun maxHeight(p0: Float): Container<T>
Link copied to clipboard
open fun maxSize(p0: Value): Container<T>
open fun maxSize(p0: Float): Container<T>
open fun maxSize(p0: Value, p1: Value): Container<T>
open fun maxSize(p0: Float, p1: Float): Container<T>
Link copied to clipboard
open fun maxWidth(p0: Value): Container<T>
open fun maxWidth(p0: Float): Container<T>
Link copied to clipboard
open fun minHeight(p0: Value): Container<T>
open fun minHeight(p0: Float): Container<T>
Link copied to clipboard
open fun minSize(p0: Value): Container<T>
open fun minSize(p0: Float): Container<T>
open fun minSize(p0: Value, p1: Value): Container<T>
open fun minSize(p0: Float, p1: Float): Container<T>
Link copied to clipboard
open fun minWidth(p0: Value): Container<T>
open fun minWidth(p0: Float): Container<T>
Link copied to clipboard
open fun moveBy(p0: Float, p1: Float)
Link copied to clipboard
open fun needsLayout(): Boolean
Link copied to clipboard
open fun notify(p0: Event, p1: Boolean): Boolean
Link copied to clipboard
open override fun pack()
Link copied to clipboard
open fun pad(p0: Value): Container<T>
open fun pad(p0: Float): Container<T>
open fun pad(p0: Value, p1: Value, p2: Value, p3: Value): Container<T>
open fun pad(p0: Float, p1: Float, p2: Float, p3: Float): Container<T>
Link copied to clipboard
open fun padBottom(p0: Value): Container<T>
open fun padBottom(p0: Float): Container<T>
Link copied to clipboard
open fun padLeft(p0: Value): Container<T>
open fun padLeft(p0: Float): Container<T>
Link copied to clipboard
open fun padRight(p0: Value): Container<T>
open fun padRight(p0: Float): Container<T>
Link copied to clipboard
open fun padTop(p0: Value): Container<T>
open fun padTop(p0: Float): Container<T>
Link copied to clipboard
open fun parentToLocalCoordinates(p0: Vector2): Vector2
Link copied to clipboard
inline fun <S> KWidget<S>.particleEffect(particleEffect: ParticleEffect, resetOnStart: Boolean = true, init: ParticleEffectActor.(S) -> Unit = {}): ParticleEffectActor
Link copied to clipboard
open fun prefHeight(p0: Value): Container<T>
open fun prefHeight(p0: Float): Container<T>
Link copied to clipboard
open fun prefSize(p0: Value): Container<T>
open fun prefSize(p0: Float): Container<T>
open fun prefSize(p0: Value, p1: Value): Container<T>
open fun prefSize(p0: Float, p1: Float): Container<T>
Link copied to clipboard
open fun prefWidth(p0: Value): Container<T>
open fun prefWidth(p0: Float): Container<T>
Link copied to clipboard
inline fun <S> KWidget<S>.progressBar(min: Float = 0.0f, max: Float = 1.0f, step: Float = 0.01f, vertical: Boolean = false, style: String = if (vertical) defaultVerticalStyle else defaultHorizontalStyle, skin: Skin = Scene2DSkin.defaultSkin, init: ProgressBar.(S) -> Unit = {}): ProgressBar
Link copied to clipboard
open fun remove(): Boolean
Link copied to clipboard
open fun removeAction(@Null p0: Action)
Link copied to clipboard
open override fun removeActor(p0: Actor): Boolean
open override fun removeActor(p0: Actor, p1: Boolean): Boolean
Link copied to clipboard
open override fun removeActorAt(p0: Int, p1: Boolean): Actor
Link copied to clipboard
open fun removeCaptureListener(p0: EventListener): Boolean
Link copied to clipboard
open fun removeListener(p0: EventListener): Boolean
Link copied to clipboard
open fun right(): Container<T>
Link copied to clipboard
open fun rotateBy(p0: Float)
Link copied to clipboard
open fun scaleBy(p0: Float)
open fun scaleBy(p0: Float, p1: Float)
Link copied to clipboard
open fun screenToLocalCoordinates(p0: Vector2): Vector2
Link copied to clipboard
inline fun <S> KWidget<S>.scrollPane(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KScrollPane.(S) -> Unit = {}): KScrollPane
Link copied to clipboard
inline fun <I> KWidget<*>.selectBox(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KSelectBox<I>.() -> Unit = {}): KSelectBox<I>
Link copied to clipboard
fun <I> KWidget<*>.selectBoxOf(items: Array<I>? = null, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin): KSelectBox<I>
Link copied to clipboard
open fun setBackground(@Null p0: Drawable, p1: Boolean)
Link copied to clipboard
open fun setBounds(p0: Float, p1: Float, p2: Float, p3: Float)
Link copied to clipboard
open fun setColor(p0: Float, p1: Float, p2: Float, p3: Float)
Link copied to clipboard
open fun setDebug(p0: Boolean, p1: Boolean)
Link copied to clipboard
open override fun setFillParent(p0: Boolean)
Link copied to clipboard
open override fun setLayoutEnabled(p0: Boolean)
Link copied to clipboard
open fun setOrigin(p0: Int)
open fun setOrigin(p0: Float, p1: Float)
Link copied to clipboard
open fun setPosition(p0: Float, p1: Float)
open fun setPosition(p0: Float, p1: Float, p2: Int)
Link copied to clipboard
open fun setRound(p0: Boolean)
Link copied to clipboard
open fun setScale(p0: Float)
open fun setScale(p0: Float, p1: Float)
Link copied to clipboard
open fun setSize(p0: Float, p1: Float)
Link copied to clipboard
open fun setX(p0: Float, p1: Int)
Link copied to clipboard
open fun setY(p0: Float, p1: Int)
Link copied to clipboard
open fun setZIndex(p0: Int): Boolean
Link copied to clipboard
open fun size(p0: Value): Container<T>
open fun size(p0: Float): Container<T>
open fun size(p0: Value, p1: Value): Container<T>
open fun size(p0: Float, p1: Float): Container<T>
Link copied to clipboard
open fun sizeBy(p0: Float)
open fun sizeBy(p0: Float, p1: Float)
Link copied to clipboard
inline fun <S> KWidget<S>.slider(min: Float = 0.0f, max: Float = 1.0f, step: Float = 0.01f, vertical: Boolean = false, style: String = if (vertical) defaultVerticalStyle else defaultHorizontalStyle, skin: Skin = Scene2DSkin.defaultSkin, init: Slider.(S) -> Unit = {}): Slider
Link copied to clipboard
inline fun <S> KWidget<S>.splitPane(vertical: Boolean = false, style: String = if (vertical) defaultVerticalStyle else defaultHorizontalStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KSplitPane.(S) -> Unit = {}): KSplitPane
Link copied to clipboard
inline fun <S> KWidget<S>.stack(init: KStack.(S) -> Unit = {}): KStack
Link copied to clipboard
open fun stageToLocalCoordinates(p0: Vector2): Vector2
Link copied to clipboard
open override fun <T : Actor> storeActor(actor: T): T

Internal utility method for adding actors to the group. Assumes the actor might be stored in a container.

Link copied to clipboard
open fun swapActor(p0: Actor, p1: Actor): Boolean
open fun swapActor(p0: Int, p1: Int): Boolean
Link copied to clipboard
inline fun <S> KWidget<S>.table(skin: Skin = Scene2DSkin.defaultSkin, init: KTableWidget.(S) -> Unit = {}): KTableWidget
Link copied to clipboard
inline fun <S> KWidget<S>.textArea(text: String = "", style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: TextArea.(S) -> Unit = {}): TextArea
Link copied to clipboard
inline fun <S> KWidget<S>.textButton(text: String, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KTextButton.(S) -> Unit = {}): KTextButton
Link copied to clipboard
inline fun <S> KWidget<S>.textField(text: String = "", style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: TextField.(S) -> Unit = {}): TextField
Link copied to clipboard
inline fun Actor.textTooltip(text: String, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, tooltipManager: TooltipManager = TooltipManager.getInstance(), init: Label.(TextTooltip) -> Unit = {}): TextTooltip

Adds a new TextTooltip to this actor.

Link copied to clipboard
open fun toBack()
Link copied to clipboard
open fun toFront()
Link copied to clipboard
inline fun Actor.tooltip(background: String? = null, skin: Skin = Scene2DSkin.defaultSkin, tooltipManager: TooltipManager = TooltipManager.getInstance(), init: KTableWidget.(Tooltip<KTableWidget>) -> Unit = {}): Tooltip<KTableWidget>

Adds a new Tooltip to this actor, storing a flexible Table widget.

Link copied to clipboard
open fun top(): Container<T>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
inline fun <S> KWidget<S>.touchpad(deadzone: Float, style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: Touchpad.(S) -> Unit = {}): Touchpad
Link copied to clipboard
inline fun <S> KWidget<S>.tree(style: String = defaultStyle, skin: Skin = Scene2DSkin.defaultSkin, init: KTreeWidget.(S) -> Unit = {}): KTreeWidget
Link copied to clipboard
open override fun validate()
Link copied to clipboard
inline fun <S> KWidget<S>.verticalGroup(init: KVerticalGroup.(S) -> Unit = {}): KVerticalGroup
Link copied to clipboard
open fun width(p0: Value): Container<T>
open fun width(p0: Float): Container<T>