TextureRect
Constructors
Types
Functions
Sets the parent of the child to this Node sets it at the specified index.
Sets the parent of the children to this Node.
Anchor this node using an AnchorLayout preset.
Clears all the local theme cache maps
Clears the local theme color map.
Clears the local theme constantOverrides map.
Clears the local theme fontOverrides map.
Clears the local theme fontOverrides map.
Clears all the local theme override maps.
Draw any debug related items here.
Remove the Node from the SceneGraph and destroys all children.
Removes & destroys all children nodes.
Sets the position of the CanvasItem in global space.
Sets the rotation of the CanvasItem in global space in radians.
Sets the global scale of the CanvasItem.
Checks if the control has a theme Drawable.
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.
Determines if this Node contains any children.
Open method to process when a control loses focus.
Open method that is to process and recalculate minimum size when a theme is changed.
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
Internal debug rendering that needs to be done on the node that shouldn't be overridden. Calls propagateInternalDebugRender method.
Internal post rendering that needs to be done on the node that shouldn't be overridden. Calls propagatePostRender method.
Internal pre rendering that needs to be done on the node that shouldn't be overridden. Calls propagatePreRender method.
Internal rendering that needs to be done on the node that shouldn't be overridden. Calls propagateInternalRender method.
Removes the node if this node is its parent.
Removes the child at the specified index.
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
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
Sends the child node at the specified index to the bottom of this list which will be rendered on top.
Sends the child node at the specified index to the top of this list which will be rendered behind.
Sends the child node to the bottom of this list which will be rendered on top.
Sends the child node to the top of this list which will be rendered behind.
Swaps the two children positions within the parents list
Swaps children positions at the specified indices.
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.
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.
Open method that is to process and accept inputs on UI elements.
Updates the current CanvasItem transform if it is dirty.
Properties
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.
A map for storing the result of getThemeColor when needed to prevent searching the tree every frame.
A map for storing the result of getThemeConstant when needed to prevent searching the tree every frame.
A map for storing the result of getThemeDrawable when needed to prevent searching the tree every frame.
Attempts to grab the SceneGraph.fixedProgressionRatio. Defaults to 1
if not.
A map for storing the result of getThemeFont when needed to prevent searching the tree every frame.
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.
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
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.
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.
Distance between the node's bottom edge and its parent control, based on anchorBottom.
Distance between the node's left edge and its parent control, based on anchorLeft.
Distance between the node's right edge and its parent control, based on anchorRight.
Controls when the control will be able to receive mouse button input events through onUiInput and how these events are handled.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
A Signal the is emitted when the horizontalSizeFlags or verticalSizeFlags are changed.
A Signal that is emitted when the control receives an InputEvent.
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.
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.
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.
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
Pixels per unit. Mainly used when rendering a Node. This is based off of the SceneGraph.ppu.
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
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.
The TextureSlice that should be displayed by this TextureRect node. Sets the origin of the TextureRect to the center.
If true
, then the internal size calculations with use the TextureSlice.originalWidth&TextureSlice.originalHeight for its sizing instead of the trimmed width & height. This is useful if a TextureSlice requires the empty margin around it.
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.
Extensions
Adds a CanvasLayer to the current Node as a child and then triggers the callback
Adds a CenterContainer to the current Node as a child and then triggers the callback
Adds a VBoxContainer to the current Node as a child and then triggers the callback
Adds a DirectionalLight to the current Node as a child and then triggers the callback
Adds a FrameBufferContainer to the current Node as a child and then triggers the callback
Adds a HBoxContainer to the current Node as a child and then triggers the callback
Adds a HScrollBar to the current Node as a child and then triggers the callback
Adds a NinePatchRect to the current Node as a child and then triggers the callback
Adds a PaddedContainer to the current Node as a child and then triggers the callback
Adds a PanelContainer to the current Node as a child and then triggers the callback
Adds a ProgressBar to the current Node as a child and then triggers the callback
Adds a HBoxContainer to the current Node as a child and then triggers the callback
Adds a ScrollContainer to the current Node as a child and then triggers the callback
Adds a TextureProgress to the current Node as a child and then triggers the callback
Adds a TextureRect to the current Node as a child and then triggers the callback
Adds a VBoxContainer to the current Node as a child and then triggers the callback
Adds a ViewportCanvasLayer to the current Node as a child and then triggers the callback
Adds a VScrollBar to the current Node as a child and then triggers the callback