Button

open class Button : BaseButton

Author

Colton Daily

Constructors

Link copied to clipboard
fun Button()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class ThemeVars

Functions

Link copied to clipboard
fun addChild(child: Node): Node

Sets the parent of the child to this Node.

Link copied to clipboard
fun addChildAt(child: Node, index: Int): Node

Sets the parent of the child to this Node sets it at the specified index.

Link copied to clipboard
fun addChildren(vararg children: Node): Node

Sets the parent of the children to this Node.

Link copied to clipboard

Anchor this node using an AnchorLayout preset.

Link copied to clipboard
open override fun callInput(event: InputEvent<*>)
Link copied to clipboard
open override fun callUnhandledInput(event: InputEvent<*>)
Link copied to clipboard

Clears all the local theme cache maps

Link copied to clipboard

Clears the local theme color map.

Link copied to clipboard

Clears the local theme constantOverrides map.

Link copied to clipboard

Clears the local theme fontOverrides map.

Link copied to clipboard

Clears the local theme fontOverrides map.

Link copied to clipboard

Clears all the local theme override maps.

Link copied to clipboard
open operator override fun compareTo(other: Node): Int

Compares Node by depth and position at each depth.

Link copied to clipboard
fun copyFrom(node: CanvasItem)
Link copied to clipboard
open override fun debugRender(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

Draw any debug related items here.

Link copied to clipboard
fun destroy()

Remove the Node from the SceneGraph and destroys all children.

Link copied to clipboard

Removes & destroys all children nodes.

Link copied to clipboard
fun enabled(value: Boolean): Node

Enables/disables the Node. When disabled colliders are removed from the Physics system and will not be called.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getThemeColor(name: String, type: String = this::class.simpleName ?: ""): Color
Link copied to clipboard
fun getThemeConstant(name: String, type: String = this::class.simpleName ?: ""): Int
Link copied to clipboard
fun getThemeDrawable(name: String, type: String = this::class.simpleName ?: ""): Drawable
Link copied to clipboard
fun getThemeFont(name: String, type: String = this::class.simpleName ?: ""): BitmapFont
Link copied to clipboard

Sets the position of the CanvasItem in global space.

Link copied to clipboard

Sets the rotation of the CanvasItem in global space in radians.

Link copied to clipboard

Sets the global scale of the CanvasItem.

Link copied to clipboard
fun grabFocus()
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun hasPoint(px: Float, py: Float): Boolean

Determines if the point is in the controls bounding rectangle.

Link copied to clipboard
fun hasThemeDrawable(name: String, type: String = this::class.simpleName ?: ""): Boolean

Checks if the control has a theme Drawable.

Link copied to clipboard
fun hit(hx: Float, hy: Float): Control?

Attempts to hit a Control node. This will check any children Control nodes first and then itself. This will return null if the control is not enabled or if mouseFilter is set to MouseFilter.NONE.

Link copied to clipboard

Determines if this Node has zero children nodes.

Link copied to clipboard

Determines if this Node contains any children.

Link copied to clipboard
operator fun minusAssign(child: Node)
Link copied to clipboard
fun moveChild(child: Node, index: Int): Node

Moves a child node to the specified index.

Link copied to clipboard
open fun onDescendantAdded(child: Node)
Link copied to clipboard
open fun onDescendantRemoved(child: Node)
Link copied to clipboard
open override fun onDestroy()

Called when destroy is invoked and all of its children have been destroyed.

Link copied to clipboard
open fun onFocus()

Open method to process when a control is gain focus.

Link copied to clipboard
open override fun onFocusLost()

Open method to process when a control loses focus.

Link copied to clipboard
open fun onThemeChanged()

Open method that is to process and recalculate minimum size when a theme is changed.

Link copied to clipboard
open override fun parent(parent: Node?): Node

Sets the parent Node of this Node.

Link copied to clipboard
operator fun plusAssign(child: Node)
Link copied to clipboard
fun position(x: Float, y: Float, invokeCallback: Boolean = true): CanvasItem

Sets the position of the CanvasItem relative to the parent Node. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalPosition

Link copied to clipboard
open fun postRender(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

Invoked after render. Calculations or logic that needs to be done after rendering such as flushing the batch or ending a frame buffer. The Camera can be used for culling and the Batch instance to draw with.

Link copied to clipboard
open fun preRender(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

Invoked before render. Calculations or logic that needs to be done before rendering such as flushing the batch or starting a frame buffer. The Camera can be used for culling and the Batch instance to draw with.

Link copied to clipboard
fun propagateDebugRender(batch: Batch, camera: Camera, camera3d: Camera, shapeRenderer: ShapeRenderer, renderCallback: (Node, Batch, Camera, Camera, ShapeRenderer) -> Unit?)

Internal debug rendering that needs to be done on the node that shouldn't be overridden. Calls propagateInternalDebugRender method.

Link copied to clipboard
Link copied to clipboard
open fun propagateHit(hx: Float, hy: Float): Control?
Link copied to clipboard
open fun propagateInput(event: InputEvent<*>): Boolean
Link copied to clipboard
open override fun propagateInternalDebugRender(batch: Batch, camera: Camera, camera3d: Camera, shapeRenderer: ShapeRenderer, renderCallback: (Node, Batch, Camera, Camera, ShapeRenderer) -> Unit?)
Link copied to clipboard
open override fun propagateInternalRender(batch: Batch, camera: Camera, camera3d: Camera, shapeRenderer: ShapeRenderer, renderCallback: (Node, Batch, Camera, Camera, ShapeRenderer) -> Unit?)
Link copied to clipboard
fun propagatePostRender(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

Internal post rendering that needs to be done on the node that shouldn't be overridden. Calls propagatePostRender method.

Link copied to clipboard
Link copied to clipboard
fun propagatePreRender(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

Internal pre rendering that needs to be done on the node that shouldn't be overridden. Calls propagatePreRender method.

Link copied to clipboard
Link copied to clipboard
fun propagateRender(batch: Batch, camera: Camera, camera3d: Camera, shapeRenderer: ShapeRenderer, renderCallback: (Node, Batch, Camera, Camera, ShapeRenderer) -> Unit?)

Internal rendering that needs to be done on the node that shouldn't be overridden. Calls propagateInternalRender method.

Link copied to clipboard
fun propagateResize(width: Int, height: Int, center: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removeChild(child: Node): Node

Removes the node if this node is its parent.

Link copied to clipboard

Removes the child at the specified index.

Link copied to clipboard
open override fun render(batch: Batch, camera: Camera, shapeRenderer: ShapeRenderer)

The main render method. The Camera can be used for culling and the Batch instance to draw with.

Link copied to clipboard

Sets the rotation of the CanvasItem relative to the parent Node in radians. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalRotation

Link copied to clipboard
fun scale(value: Vec2f): CanvasItem

Sets the scale of the CanvasItem relative to the parent transform's scales. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalScale

Link copied to clipboard

Sends the child node at the specified index to the bottom of this list which will be rendered on top.

Link copied to clipboard

Sends the child node at the specified index to the top of this list which will be rendered behind.

Link copied to clipboard

Sends the child node to the bottom of this list which will be rendered on top.

Link copied to clipboard
fun sendChildToTop(child: Node): Node

Sends the child node to the top of this list which will be rendered behind.

Link copied to clipboard
fun setAnchor(side: Control.Side, value: Float, keepMargins: Boolean = true, triggerSizeChanged: Boolean = true)
Link copied to clipboard

Assigns the BaseButton to the ButtonGroup and removes itself from its previous.

Link copied to clipboard
fun setRect(tx: Float, ty: Float, tWidth: Float, tHeight: Float)

Set the bounding rectangle of this control.

Link copied to clipboard
fun size(newWidth: Float, newHeight: Float)

Set the control to a new size.

Link copied to clipboard
fun swapChildren(child: Node, child2: Node): Node

Swaps the two children positions within the parents list

Link copied to clipboard
fun swapChildrenAt(idx: Int, idx2: Int): Node

Swaps children positions at the specified indices.

Link copied to clipboard
fun toGlobal(point: Vec2f): Vec2f
fun toGlobal(x: Float, y: Float): Vec2f

Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the Node2D it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position.

Link copied to clipboard
fun toLocal(point: Vec2f): Vec2f
fun toLocal(x: Float, y: Float): Vec2f

Transforms the provided global position into a position in local coordinate space. The output will be local relative to the Node2D it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun translate(offset: Vec2f)
fun translate(x: Float, y: Float)

Translates the position by the offset vector in local coordinates.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun uiInput(event: InputEvent<*>)

Open method that is to process and accept inputs on UI elements.

Link copied to clipboard
open fun updateTransform()

Updates the current CanvasItem transform if it is dirty.

Link copied to clipboard
fun visible(value: Boolean): Node

Shows/hides the Node. When disabled propagateInternalRender is no longer called.

Properties

Link copied to clipboard
Link copied to clipboard

Anchors the bottom edge of the node to the origin, the center or the end of its parent control. It changes how the bottom offset updates when the node moves or changes size.

Link copied to clipboard

Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left offset updates when the node moves or changes size.

Link copied to clipboard

Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size.

Link copied to clipboard

Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size.

Link copied to clipboard
var canvas: CanvasLayer? = null

The CanvasLayer that this Node belongs to. The closest parent CanvasLayer will be selected. If none are found, the scene root viewport will be used.

Link copied to clipboard

The current child count for this Node. Alias for NodeList.size.

Link copied to clipboard

The children of this Node. Alias for nodes.

Link copied to clipboard
Link copied to clipboard

A map for storing the result of getThemeColor when needed to prevent searching the tree every frame.

Link copied to clipboard

The map of overrides for a theme Color. Local overrides always take precedence when fetching theme items for the control. An override can be removed with remove.

Link copied to clipboard

The combined height of minHeight and internalMinHeight.

Link copied to clipboard

The combined width of minWidth and internalMinWidth.

Link copied to clipboard

A map for storing the result of getThemeConstant when needed to prevent searching the tree every frame.

Link copied to clipboard

The map of overrides for a theme Int. Local overrides always take precedence when fetching theme items for the control. An override can be removed with remove.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A map for storing the result of getThemeDrawable when needed to prevent searching the tree every frame.

Link copied to clipboard

The map of overrides for a theme Drawable. Local overrides always take precedence when fetching theme items for the control. An override can be removed with remove.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var ellipsis: String? = null
Link copied to clipboard

Enables/disables the node.

Link copied to clipboard

Attempts to grab the SceneGraph.fixedProgressionRatio. Defaults to 1 if not.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var focusNext: Control? = null
Link copied to clipboard
var focusPrev: Control? = null
Link copied to clipboard
Link copied to clipboard

A map for storing the result of getThemeFont when needed to prevent searching the tree every frame.

Link copied to clipboard
Link copied to clipboard

The map of overrides for a theme BitmapFont. Local overrides always take precedence when fetching theme items for the control. An override can be removed with remove.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The position of the CanvasItem in global space. If you want to set the x,y properties of this Vec2f then use the globalX and globalY properties of this CanvasItem

Link copied to clipboard

The rotation of the CanvasItem in global space in radians

Link copied to clipboard

The global scale of the CanvasItem. If you want to set the x,y properties of this Vec2f then use the globalScaleX and globalScaleY properties of this CanvasItem.

Link copied to clipboard

The global x-scale of the CanvasItem.

Link copied to clipboard

The global y-scale of the CanvasItem.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The height of the node's bounding rectangle, in pixels. Container node's update this property automatically.

Link copied to clipboard
Link copied to clipboard

Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.

Link copied to clipboard

Tells the parent Container nodes how they should resize and place the node on the X axis. Use one of the SizeFlag constants to change the flags.

Link copied to clipboard
Link copied to clipboard
val id: Int

Unique identifier for this node.

Link copied to clipboard
val index: Int

The index of this Node as a child in it's parent.

Link copied to clipboard

Check if this Node is in a SceneGraph

Link copied to clipboard

If destroy was called, this will be true until the next time node's are processed.

Link copied to clipboard
Link copied to clipboard

Distance between the node's bottom edge and its parent control, based on anchorBottom.

Link copied to clipboard

Distance between the node's left edge and its parent control, based on anchorLeft.

Link copied to clipboard

Distance between the node's right edge and its parent control, based on anchorRight.

Link copied to clipboard

Distance between the node's top edge and its parent control, based on anchorTop.

Link copied to clipboard
var material: Material? = null
Link copied to clipboard
Link copied to clipboard
var minHeight: Float = 0.0f

The minimum height that this node should use.

Link copied to clipboard
var minWidth: Float = 0.0f

The minimum width that this node should use.

Link copied to clipboard

Controls when the control will be able to receive mouse button input events through onUiInput and how these events are handled.

Link copied to clipboard

Node name. useful for doing scene-wide searches for an node

Link copied to clipboard

The list of Nodes in this scene.

Link copied to clipboard

List of 'addedToScene' callbacks called when onAddedToScene is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

List of 'debugRender' callbacks called when debugRender is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'destroy' callbacks called when destroy is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'onDisabled' callbacks called when onDisabled is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'onEnabled' callbacks called when onEnabled is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'fixed-update' callbacks called when fixedUpdate is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

A Signal that is emitted when the control gains focus.

Link copied to clipboard

A Signal that is emitted when the control loses focus.

Link copied to clipboard

List of 'input' callbacks called when input is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'onInvisible' callbacks called when onInvisible is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

A Signal that is emitted when the control's minimum size changes via minWidth or minHeight

Link copied to clipboard

List of 'postRender' callbacks called after postRender is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'post-update' callbacks called when postUpdate is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'preRender' callbacks called when onPreRender is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard
Link copied to clipboard

List of 'pre-update' callbacks called when preUpdate is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'ready' callbacks called when ready is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'removedFromScene' callbacks called when onRemovedFromScene is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard
Link copied to clipboard

List of 'render' callbacks called when propagateInternalRender is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'resize' callbacks called when resize is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

A Signal that is emitted when the control changes size.

Link copied to clipboard

A Signal the is emitted when the horizontalSizeFlags or verticalSizeFlags are changed.

Link copied to clipboard
Link copied to clipboard

A Signal that is emitted when the control receives an InputEvent.

Link copied to clipboard

List of 'unhandledInput' callbacks called when unhandledInput is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'update' callbacks called when update is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard

List of 'onVisible' callbacks called when onVisible is called. Add any additional callbacks directly to this list. The main use is to add callbacks directly to nodes inline when building a SceneGraph vs having to extend a class directly.

Link copied to clipboard
var padding: Float = 10.0f
Link copied to clipboard
var parent: Node?

The parent Node, if any.

Link copied to clipboard

The position of the CanvasItem relative to the parent transform. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalPosition. If you want to set the x,y properties of this Vec2f then use the x and y properties of this CanvasItem

Link copied to clipboard
val ppu: Float

Pixels per unit. Mainly used when rendering a Node. This is based off of the SceneGraph.ppu.

Link copied to clipboard

The inverse of ppu. This is based off the SceneGraph.ppuInv.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The rotation of the CanvasItem relative to the parent transform's rotation. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalRotation

Link copied to clipboard

The scale of the CanvasItem relative to the parent transform's scales. If the CanvasItem has no parent or if the parent node is NOT a CanvasItem, then it is the same a globalScale. If you want to set the x,y properties of this Vec2f then use the scaleX and scaleY properties of this CanvasItem.

Link copied to clipboard

The x-scale of the CanvasItem relative to the parent transform's scales.

Link copied to clipboard

The y-scale of the CanvasItem relative to the parent transform's scales.

Link copied to clipboard
var scene: SceneGraph<*>?

The scene this node belongs to.

Link copied to clipboard
var stretchRatio: Float = 1.0f

If the node and at least one of its neighbors uses the SIZE_EXPAND size flag, the parent Container will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space.

Link copied to clipboard
Link copied to clipboard
var theme: Theme? = null

The theme of this node and all its Control children use.

Link copied to clipboard
Link copied to clipboard

Specifies how often this node's update method should be called. 1 means every frame, 2 is every other, etc

Link copied to clipboard
var uppercase: Boolean = false
Link copied to clipboard
Link copied to clipboard

Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.

Link copied to clipboard

Tells the parent Container nodes how they should resize and place the node on the Y axis. Use one of the SizeFlag constants to change the flags.

Link copied to clipboard

Shows/hides the node if it is renderable.

Link copied to clipboard

The width of the node's bounding rectangle, in pixels. Container node's update this property automatically.

Link copied to clipboard
var wrap: Boolean = false
Link copied to clipboard
var x: Float
Link copied to clipboard
var y: Float

Extensions

Link copied to clipboard
inline fun Node.button(callback: Button.() -> Unit = {}): Button

Adds a Button to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.camera2d(callback: Camera2D.() -> Unit = {}): Camera2D

Adds a Camera2D to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.camera3d(callback: Camera3D.() -> Unit = {}): Camera3D

Adds a Camera3D to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.canvasLayer(callback: CanvasLayer.() -> Unit = {}): CanvasLayer

Adds a CanvasLayer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.centerContainer(callback: CenterContainer.() -> Unit = {}): CenterContainer

Adds a CenterContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.column(callback: VBoxContainer.() -> Unit = {}): VBoxContainer

Adds a VBoxContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.container(callback: Container.() -> Unit = {}): Container

Adds a Container to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.control(callback: Control.() -> Unit = {}): Control

Adds a Control to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.directionalLight(callback: DirectionalLight.() -> Unit = {}): DirectionalLight

Adds a DirectionalLight to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun <T : Node> Node.findFirstNodeOfType(): T?
Link copied to clipboard
inline fun Node.frameBuffer(callback: FrameBufferNode.() -> Unit = {}): FrameBufferNode
Link copied to clipboard

Adds a FrameBufferContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.hBoxContainer(callback: HBoxContainer.() -> Unit = {}): HBoxContainer

Adds a HBoxContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.hScrollBar(callback: HScrollBar.() -> Unit = {}): HScrollBar

Adds a HScrollBar to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.label(callback: Label.() -> Unit = {}): Label

Adds a Label to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.lineEdit(callback: LineEdit.() -> Unit = {}): LineEdit

Adds a LineEdit to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.meshNode(callback: MeshNode.() -> Unit = {}): MeshNode

Adds a MeshNode to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.ninePatchRect(callback: NinePatchRect.() -> Unit = {}): NinePatchRect

Adds a NinePatchRect to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.node(callback: Node.() -> Unit = {}): Node

Adds a Node to the current Node as a child and then triggers the callback

inline fun <T : Node> Node.node(node: T, callback: T.() -> Unit = {}): T

Adds the specified Node to the current Node as a child and then triggers the callback. This can be used for classes that extend node that perhaps they don't have a DSL method to initialize it.

Link copied to clipboard
inline fun Node.node2d(callback: Node2D.() -> Unit = {}): Node2D

Adds a Node2D to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.node3d(callback: Node3D.() -> Unit = {}): Node3D

Adds a Node3D to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.paddedContainer(callback: PaddedContainer.() -> Unit = {}): PaddedContainer

Adds a PaddedContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.panel(callback: Panel.() -> Unit = {}): Panel

Adds a Panel to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.panelContainer(callback: PanelContainer.() -> Unit = {}): PanelContainer

Adds a PanelContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.progressBar(callback: ProgressBar.() -> Unit = {}): ProgressBar

Adds a ProgressBar to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.row(callback: HBoxContainer.() -> Unit = {}): HBoxContainer

Adds a HBoxContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.scrollContainer(callback: ScrollContainer.() -> Unit = {}): ScrollContainer

Adds a ScrollContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.textureProgress(callback: TextureProgress.() -> Unit = {}): TextureProgress

Adds a TextureProgress to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.textureRect(callback: TextureRect.() -> Unit = {}): TextureRect

Adds a TextureRect to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.vBoxContainer(callback: VBoxContainer.() -> Unit = {}): VBoxContainer

Adds a VBoxContainer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.viewport(callback: ViewportCanvasLayer.() -> Unit = {}): ViewportCanvasLayer

Adds a ViewportCanvasLayer to the current Node as a child and then triggers the callback

Link copied to clipboard
inline fun Node.vScrollBar(callback: VScrollBar.() -> Unit = {}): VScrollBar

Adds a VScrollBar to the current Node as a child and then triggers the callback