reckfellENGINE

Control

A rectangular interface entity with layout, focus and GUI input.

On this page
class ControlReckfellSharpInherits CanvasItem

Control stores a UI rectangle, anchors/offsets, size bounds, theme and focus. It belongs to the regular Entity hierarchy. Use an appropriate CanvasLayer for a screen HUD independent of the world camera.

A plain Control parent permits manual layout; a Container manages eligible direct child Controls itself. Do not mix those owners for one position. Minimum, maximum and size flags affect the final rectangle. Handle GUI input in _GuiInput(); keyboard input requires focus. A FocusMode alone does not select the initial control.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ControlConstructor
# Control
C#
public Control();

Properties63

AccessibilityControlsEntitiesProperty
# AccessibilityControlsEntities
C#
public Reckfell.Collections.Array<EntityPath> AccessibilityControlsEntities { get; set; }

The paths to the nodes which are controlled by this node.

AccessibilityDescribedByEntitiesProperty
# AccessibilityDescribedByEntities
C#
public Reckfell.Collections.Array<EntityPath> AccessibilityDescribedByEntities { get; set; }

The paths to the nodes which are describing this node.

AccessibilityDescriptionProperty
# AccessibilityDescription
C#
public string AccessibilityDescription { get; set; }

The human-readable node description that is reported to assistive apps.

AccessibilityFlowToEntitiesProperty
# AccessibilityFlowToEntities
C#
public Reckfell.Collections.Array<EntityPath> AccessibilityFlowToEntities { get; set; }

The paths to the nodes which this node flows into.

AccessibilityLabeledByEntitiesProperty
# AccessibilityLabeledByEntities
C#
public Reckfell.Collections.Array<EntityPath> AccessibilityLabeledByEntities { get; set; }

The paths to the nodes which label this node.

AccessibilityLiveProperty
# AccessibilityLive
C#
public AccessibilityServer.AccessibilityLiveMode AccessibilityLive { get; set; }

The mode with which a live region updates. A live region is a Entity that is updated as a result of an external event when the user's focus may be elsewhere.

AccessibilityNameProperty
# AccessibilityName
C#
public string AccessibilityName { get; set; }

The human-readable node name that is reported to assistive apps.

AnchorBottomProperty
# AnchorBottom
C#
public float AnchorBottom { get; set; }

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. You can use one of the Control.Anchor constants for convenience.

AnchorLeftProperty
# AnchorLeft
C#
public float AnchorLeft { get; set; }

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. You can use one of the Control.Anchor constants for convenience.

AnchorRightProperty
# AnchorRight
C#
public float AnchorRight { get; set; }

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. You can use one of the Control.Anchor constants for convenience.

AnchorTopProperty
# AnchorTop
C#
public float AnchorTop { get; set; }

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. You can use one of the Control.Anchor constants for convenience.

AnchorsPresetProperty
# AnchorsPreset
C#
public int AnchorsPreset { get; set; }
AutoTranslateProperty · Deprecated
# AutoTranslate
C#
public bool AutoTranslate { get; set; }

Toggles if any text should automatically change to its translated version depending on the current locale.

ClipContentsProperty
# ClipContents
C#
public bool ClipContents { get; set; }

Enables whether rendering of CanvasItem based children should be clipped to this control's rectangle. If true, parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.

CustomMaximumSizeProperty
# CustomMaximumSize
C#
public Vector2 CustomMaximumSize { get; set; }

An additional per-axis upper bound. A negative component normalizes to -1 and means no custom bound; zero is a bound, not unlimited. Do not set minimum above maximum.

CustomMinimumSizeProperty
# CustomMinimumSize
C#
public Vector2 CustomMinimumSize { get; set; }

An additional per-axis minimum, not the final size. Built-in text/theme/content requirements also participate; inspect GetCombinedMinimumSize(). Use _GetMinimumSize and UpdateMinimumSize for a dynamic custom requirement.

FocusBehaviorRecursiveProperty
# FocusBehaviorRecursive
C#
public Control.FocusBehaviorRecursiveEnum FocusBehaviorRecursive { get; set; }

Determines which controls can be focused together with Control.FocusMode. See Control.GetFocusModeWithOverride. Since the default behavior is Control.FocusBehaviorRecursiveEnum.Inherited, this can be used to prevent all children controls from getting focused.

FocusModeProperty
# FocusMode
C#
public Control.FocusModeEnum FocusMode { get; set; }

Focus eligibility. All enables ordinary keyboard traversal; None excludes ordinary focus. Assign initial GrabFocus separately. Visibility and recursive parent rules also count; a button's Disabled does not replace None.

FocusNeighborBottomProperty
# FocusNeighborBottom
C#
public EntityPath FocusNeighborBottom { get; set; }

Tells Reckfell which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ProjectSettings.input/ui_down input action. The node must be a Control. If this property is not set, Reckfell will give focus to the closest Control to the bottom of this one.

FocusNeighborLeftProperty
# FocusNeighborLeft
C#
public EntityPath FocusNeighborLeft { get; set; }

Tells Reckfell which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ProjectSettings.input/ui_left input action. The node must be a Control. If this property is not set, Reckfell will give focus to the closest Control to the left of this one.

FocusNeighborRightProperty
# FocusNeighborRight
C#
public EntityPath FocusNeighborRight { get; set; }

Tells Reckfell which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ProjectSettings.input/ui_right input action. The node must be a Control. If this property is not set, Reckfell will give focus to the closest Control to the right of this one.

FocusNeighborTopProperty
# FocusNeighborTop
C#
public EntityPath FocusNeighborTop { get; set; }

Tells Reckfell which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ProjectSettings.input/ui_up input action. The node must be a Control. If this property is not set, Reckfell will give focus to the closest Control to the top of this one.

FocusNextProperty
# FocusNext
C#
public EntityPath FocusNext { get; set; }

A path relative to this control to the next ordinary Tab target. Use GetPathTo(target) and maintain target existence/visibility when the tree changes. Arrow directions are configured separately through FocusNeighbor*.

FocusPreviousProperty
# FocusPrevious
C#
public EntityPath FocusPrevious { get; set; }

Tells Reckfell which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the ProjectSettings.input/ui_focus_prev input action. If this property is not set, Reckfell will select a "best guess" based on surrounding nodes in the scene tree.

GlobalPositionProperty
# GlobalPosition
C#
public Vector2 GlobalPosition { get; set; }

The node's global position, relative to the world (usually to the CanvasLayer).

GrowHorizontalProperty
# GrowHorizontal
C#
public Control.GrowDirection GrowHorizontal { get; set; }

Controls the direction on the horizontal axis in which the control should grow or shrink if its horizontal size is changed.

GrowVerticalProperty
# GrowVertical
C#
public Control.GrowDirection GrowVertical { get; set; }

Controls the direction on the vertical axis in which the control should grow or shrink if its vertical size is changed.

LayoutDirectionProperty
# LayoutDirection
C#
public Control.LayoutDirectionEnum LayoutDirection { get; set; }

Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). See also Control.IsLayoutRtl.

LayoutModeProperty
# LayoutMode
C#
public int LayoutMode { get; set; }
LocalizeNumeralSystemProperty
# LocalizeNumeralSystem
C#
public bool LocalizeNumeralSystem { get; set; }

If true, automatically converts code line numbers, list indices, SpinBox and ProgressBar values from the Western Arabic (0..9) to the numeral systems used in current locale. Note: Numbers within the text are not automatically converted, it can be done manually, using TextServer.FormatNumber.

MouseBehaviorRecursiveProperty
# MouseBehaviorRecursive
C#
public Control.MouseBehaviorRecursiveEnum MouseBehaviorRecursive { get; set; }

Determines which controls can receive mouse input together with Control.MouseFilter. See Control.GetMouseFilterWithOverride. Since the default behavior is Control.MouseBehaviorRecursiveEnum.Inherited, this can be used to prevent all children controls from receiving mouse input.

MouseDefaultCursorShapeProperty
# MouseDefaultCursorShape
C#
public Control.CursorShape MouseDefaultCursorShape { get; set; }

The default cursor shape for this control. Useful for Reckfell plugins and applications or games that use the system's mouse cursors. Note: On Linux, shapes may vary depending on the cursor theme of the system.

MouseFilterProperty
# MouseFilter
C#
public Control.MouseFilterEnum MouseFilter { get; set; }

Stop stops ordinary upward pointer propagation; Pass allows propagation to the parent and is not click-through to siblings; Ignore excludes the control from hit testing. Keyboard focus is configured separately.

MouseForcePassScrollEventsProperty
# MouseForcePassScrollEvents
C#
public bool MouseForcePassScrollEvents { get; set; }

When enabled, scroll wheel events processed by Control.GuiInput will be passed to the parent control even if Control.MouseFilter is set to Control.MouseFilterEnum.Stop. You should disable it on the root of your UI if you do not want scroll events to go to the Entity._UnhandledInput processing. Note: Because this property defaults to true, this allows nested scrollable containers to work out of the box.

OffsetBottomProperty
# OffsetBottom
C#
public float OffsetBottom { get; set; }

Distance between the node's bottom edge and its parent control, based on Control.AnchorBottom. Offsets are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Offsets update automatically when you move or resize the node.

OffsetLeftProperty
# OffsetLeft
C#
public float OffsetLeft { get; set; }

Distance between the node's left edge and its parent control, based on Control.AnchorLeft. Offsets are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Offsets update automatically when you move or resize the node.

OffsetRightProperty
# OffsetRight
C#
public float OffsetRight { get; set; }

Distance between the node's right edge and its parent control, based on Control.AnchorRight. Offsets are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Offsets update automatically when you move or resize the node.

OffsetTopProperty
# OffsetTop
C#
public float OffsetTop { get; set; }

Distance between the node's top edge and its parent control, based on Control.AnchorTop. Offsets are often controlled by one or multiple parent Container nodes, so you should not modify them manually if your node is a direct child of a Container. Offsets update automatically when you move or resize the node.

OffsetTransformEnabledProperty
# OffsetTransformEnabled
C#
public bool OffsetTransformEnabled { get; set; }

If true, applies all offset transform properties. Otherwise, no offset transform is applied and the properties have no effect.

OffsetTransformPivotProperty
# OffsetTransformPivot
C#
public Vector2 OffsetTransformPivot { get; set; }

Pivot used by Control.OffsetTransformRotation and Control.OffsetTransformScale in absolute units. The final pivot position is the combined value of this property and Control.OffsetTransformPivotRatio. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformPivotRatioProperty
# OffsetTransformPivotRatio
C#
public Vector2 OffsetTransformPivotRatio { get; set; }

Same as Control.OffsetTransformPivot but expressed in units relative to the Control Control.Size where Vector2(0, 0) is the top-left corner of this control, and Vector2(1, 1) is its bottom-right corner. The final pivot position is the combined value of this property and Control.OffsetTransformPivot. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformPositionProperty
# OffsetTransformPosition
C#
public Vector2 OffsetTransformPosition { get; set; }

Position offset in absolute units. The final offset is the combined value of this property and Control.OffsetTransformPositionRatio. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformPositionRatioProperty
# OffsetTransformPositionRatio
C#
public Vector2 OffsetTransformPositionRatio { get; set; }

Same as Control.OffsetTransformPosition but expressed in units relative to the Control Control.Size where Vector2(0, 0) is the top-left corner of this control, and Vector2(1, 1) is its bottom-right corner. The final offset is the combined value of this property and Control.OffsetTransformPosition. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformRotationProperty
# OffsetTransformRotation
C#
public float OffsetTransformRotation { get; set; }

Rotation offset. The rotation pivot is defined by Control.OffsetTransformPivot and Control.OffsetTransformPivotRatio. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformScaleProperty
# OffsetTransformScale
C#
public Vector2 OffsetTransformScale { get; set; }

Scale offset. The scale pivot is defined by Control.OffsetTransformPivot and Control.OffsetTransformPivotRatio. Has no effect unless Control.OffsetTransformEnabled is true.

OffsetTransformVisualOnlyProperty
# OffsetTransformVisualOnly
C#
public bool OffsetTransformVisualOnly { get; set; }

If true, the offset transforms is only applied visually and does not affect input. In other words, this Control will still receive input events at its original location before the offset transform is applied. If false, the entire transform of this Control is affected and input events will register where the Control is visually. Has no effect unless Control.OffsetTransformEnabled is true.

PivotOffsetProperty
# PivotOffset
C#
public Vector2 PivotOffset { get; set; }

By default, the node's pivot is its top-left corner. When you change its Control.Rotation or Control.Scale, it will rotate or scale around this pivot. The actual offset is the combined value of this property and Control.PivotOffsetRatio.

PivotOffsetRatioProperty
# PivotOffsetRatio
C#
public Vector2 PivotOffsetRatio { get; set; }

Same as Control.PivotOffset, but expressed as uniform vector, where Vector2(0, 0) is the top-left corner of this control, and Vector2(1, 1) is its bottom-right corner. Set this property to Vector2(0.5, 0.5) to pivot around this control's center. The actual offset is the combined value of this property and Control.PivotOffset.

PositionProperty
# Position
C#
public Vector2 Position { get; set; }

The node's position, relative to its containing node. It corresponds to the rectangle's top-left corner. The property is not affected by Control.PivotOffset.

PropagateMaximumSizeProperty
# PropagateMaximumSize
C#
public bool PropagateMaximumSize { get; set; }

If true, this Control's children will use the value returned by Control.GetCombinedMaximumSize in their own size calculations.

RotationProperty
# Rotation
C#
public float Rotation { get; set; }

The node's rotation around its pivot, in radians. See Control.PivotOffset to change the pivot's position. Note: This property is edited in the inspector in degrees. If you want to use degrees in a script, use Control.RotationDegrees.

RotationDegreesProperty
# RotationDegrees
C#
public float RotationDegrees { get; set; }

Helper property to access Control.Rotation in degrees instead of radians.

ScaleProperty
# Scale
C#
public Vector2 Scale { get; set; }

The node's scale, relative to its Control.Size. Change this property to scale the node around its Control.PivotOffset. The Control's tooltip will also scale according to this value. Note: This property is mainly intended to be used for animation purposes. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the documentation instead of scaling Controls individually. Note: FontFile.Oversampling does not take Control Control.Scale into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field (applies to the default project font only), or enabling Multichannel Signed Distance Field in the import options of a DynamicFont for custom fonts. On system fonts, SystemFont.MultichannelSignedDistanceField can be enabled in the inspector. Note: If the Control node is a child of a Container node, the scale will be reset to Vector2(1, 1) when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using await get_tree().process_frame then set its Control.Scale property.

ShortcutContextProperty
# ShortcutContext
C#
public Entity ShortcutContext { get; set; }

The Entity which must be a parent of the focused Control for the shortcut to be activated. If null, the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.

SizeProperty
# Size
C#
public Vector2 Size { get; set; }

Current rectangle dimensions in local logical coordinates. Assignment observes minimum/maximum. A direct Container child can be resized by sorting; separated anchors also recalculate edges when the parent changes.

SizeFlagsHorizontalProperty
# SizeFlagsHorizontal
C#
public Control.SizeFlags SizeFlagsHorizontal { get; set; }

Horizontal placement flags in a supporting container. Fill fills the allocated share; Expand requests participation in space distribution; ExpandFill combines them. They do not replace anchors under a plain parent.

SizeFlagsStretchRatioProperty
# SizeFlagsStretchRatio
C#
public float SizeFlagsStretchRatio { get; set; }

A relative stretch weight for containers that use it. Minima, maxima, gaps and other items' flags affect the result; weight 2 does not guarantee exactly twice the final width.

SizeFlagsVerticalProperty
# SizeFlagsVertical
C#
public Control.SizeFlags SizeFlagsVertical { get; set; }

Tells the parent Container nodes how they should resize and place the node on the Y axis. Use a combination of the Control.SizeFlags constants to change the flags. See the constants to learn what each does.

ThemeProperty
# Theme
C#
public Theme Theme { get; set; }

The Theme resource this node and all its Control and Window children use. If a child node has its own Theme resource set, theme items are merged with child's definitions having higher priority. Note: Window styles will have no effect unless the window is embedded.

ThemeTypeVariationProperty
# ThemeTypeVariation
C#
public StringName ThemeTypeVariation { get; set; }

The name of a theme type variation used by this Control to look up its own theme items. When empty, the class name of the node is used (e.g. Button control), as well as the class names of all parent classes (in order of inheritance). When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See Theme.SetTypeVariation. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. Note: To look up Control's own items use various get_theme_* methods without specifying theme_type. Note: Theme items are looked for in the tree order, from branch to root, where each Control node is checked for its Control.Theme property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last.

TooltipAutoTranslateModeProperty
# TooltipAutoTranslateMode
C#
public Entity.AutoTranslateModeEnum TooltipAutoTranslateMode { get; set; }

Defines if tooltip text should automatically change to its translated version depending on the current locale. Uses the same auto translate mode as this control when set to Entity.AutoTranslateModeEnum.Inherit. Note: Tooltips customized using Control._MakeCustomTooltip do not use this auto translate mode automatically.

TooltipTextProperty
# TooltipText
C#
public string TooltipText { get; set; }

The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the Control.MouseFilter property is not Control.MouseFilterEnum.Ignore. The time required for the tooltip to appear can be changed with the ProjectSettings.gui/timers/tooltip_delay_sec setting. This string is the default return value of Control.GetTooltip. Override Control.GetTooltip to generate tooltip text dynamically. Override Control._MakeCustomTooltip to customize the tooltip interface and behavior. The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding Control._MakeCustomTooltip. The default tooltip includes a PopupPanel and Label whose theme properties can be customized using Theme methods with the "TooltipPanel" and "TooltipLabel" respectively. For example:

C#
var styleBox = new StyleBoxFlat();
styleBox.SetBgColor(new Color(1, 1, 0));
styleBox.SetBorderWidthAll(2);
// We assume here that the `Theme` property has been assigned a custom Theme beforehand.
Theme.SetStyleBox("panel", "TooltipPanel", styleBox);
Theme.SetColor("font_color", "TooltipLabel", new Color(0, 1, 1));
TranslationContextProperty
# TranslationContext
C#
public StringName TranslationContext { get; set; }

Context for automatic translation lookup on a Control. For Label, set it before Text: changing context alone does not recalculate the existing internal text. Send NotificationTranslationChanged after changing it when immediate lookup is needed.

Methods203

AcceptEventvoid
# AcceptEvent
C#
public void AcceptEvent();

Marks the current GUI event handled in the viewport. Call from _GuiInput after handling it to prevent later GUI/_UnhandledInput delivery. This cannot undo an earlier _Input or direct polling of Input state.

AccessibilityDragvoid
# AccessibilityDrag
C#
public void AccessibilityDrag();

Starts drag-and-drop operation without using a mouse.

AccessibilityDropvoid
# AccessibilityDrop
C#
public void AccessibilityDrop();

Ends drag-and-drop operation without using a mouse.

AddThemeColorOverridevoid
# AddThemeColorOverride
C#
public void AddThemeColorOverride(StringName name, Color color);

Creates a local override for a theme Color with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeColorOverride. See also Control.GetThemeColor. Example: Override a Label's color and reset it later:

C#
// Given the child Label node "MyLabel", override its font color with a custom value.
GetEntity<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0));
// Reset the font color of the child label.
GetEntity<Label>("MyLabel").RemoveThemeColorOverride("font_color");
// Alternatively it can be overridden with the default value from the Label type.
GetEntity<Label>("MyLabel").AddThemeColorOverride("font_color", GetThemeColor("font_color", "Label"));
Parameters
NameTypeDefault
nameStringName—
colorColor—
AddThemeConstantOverridevoid
# AddThemeConstantOverride
C#
public void AddThemeConstantOverride(StringName name, int constant);

Creates a local override for a theme constant with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeConstantOverride. See also Control.GetThemeConstant.

Parameters
NameTypeDefault
nameStringName—
constantint—
AddThemeFontOverridevoid
# AddThemeFontOverride
C#
public void AddThemeFontOverride(StringName name, Font font);

Creates a local override for a theme Font with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeFontOverride. See also Control.GetThemeFont.

Parameters
NameTypeDefault
nameStringName—
fontFont—
AddThemeFontSizeOverridevoid
# AddThemeFontSizeOverride
C#
public void AddThemeFontSizeOverride(StringName name, int fontSize);

Creates a local override for a theme font size with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeFontSizeOverride. See also Control.GetThemeFontSize.

Parameters
NameTypeDefault
nameStringName—
fontSizeint—
AddThemeIconOverridevoid
# AddThemeIconOverride
C#
public void AddThemeIconOverride(StringName name, Texture2D texture);

Creates a local override for a theme icon with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeIconOverride. See also Control.GetThemeIcon.

Parameters
NameTypeDefault
nameStringName—
textureTexture2D—
AddThemeSoundOverridevoid
# AddThemeSoundOverride
C#
public void AddThemeSoundOverride(StringName name, AudioStream audio);

Creates a local override for a theme sound with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeSoundOverride. See also Control.GetThemeSound.

Parameters
NameTypeDefault
nameStringName—
audioAudioStream—
AddThemeStyleboxOverridevoid
# AddThemeStyleboxOverride
C#
public void AddThemeStyleboxOverride(StringName name, StyleBox stylebox);

Creates a local override for a theme StyleBox with the specified name. Local overrides always take precedence when fetching theme items for the control. An override can be removed with Control.RemoveThemeStyleboxOverride. See also Control.GetThemeStylebox. Example: Modify a property in a StyleBox by duplicating it:

C#
// The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned.
// Resources are shared across instances, so we need to duplicate it
// to avoid modifying the appearance of all other buttons.
StyleBoxFlat newStyleboxNormal = GetEntity<Button>("MyButton").GetThemeStylebox("normal").Duplicate() as StyleBoxFlat;
newStyleboxNormal.BorderWidthTop = 3;
newStyleboxNormal.BorderColor = new Color(0, 1, 0.5f);
GetEntity<Button>("MyButton").AddThemeStyleboxOverride("normal", newStyleboxNormal);
// Remove the stylebox override.
GetEntity<Button>("MyButton").RemoveThemeStyleboxOverride("normal");
Parameters
NameTypeDefault
nameStringName—
styleboxStyleBox—
BeginBulkThemeOverridevoid
# BeginBulkThemeOverride
C#
public void BeginBulkThemeOverride();

Prevents *_theme_*_override methods from emitting Control.NotificationThemeChanged until Control.EndBulkThemeOverride is called.

EndBulkThemeOverridevoid
# EndBulkThemeOverride
C#
public void EndBulkThemeOverride();

Ends a bulk theme override update. See Control.BeginBulkThemeOverride.

FindNextValidFocusControl
# FindNextValidFocus
C#
public Control FindNextValidFocus();

Finds the next (below in the tree) Control that can receive the focus.

Returns Control
FindPrevValidFocusControl
# FindPrevValidFocus
C#
public Control FindPrevValidFocus();

Finds the previous (above in the tree) Control that can receive the focus.

Returns Control
FindValidFocusNeighborControl
# FindValidFocusNeighbor
C#
public Control FindValidFocusNeighbor(Side side);

Finds the next Control that can receive the focus on the specified Side. Note: This is different from Control.GetFocusNeighbor, which returns the path of a specified focus neighbor.

Parameters
NameTypeDefault
sideSide—
Returns Control
ForceDragvoid
# ForceDrag
C#
public void ForceDrag(Variant data, Control preview);

Forces drag and bypasses Control._GetDragData and Control.SetDragPreview by passing data and preview. Drag will start even if the mouse is neither over nor pressed on this control. The methods Control._CanDropData and Control._DropData must be implemented on controls that want to receive drop data.

Parameters
NameTypeDefault
dataVariant—
previewControl—
GetAccessibilityControlsEntitiesReckfell.Collections.Array<EntityPath>
# GetAccessibilityControlsEntities
C#
public Reckfell.Collections.Array<EntityPath> GetAccessibilityControlsEntities();
Returns Reckfell.Collections.Array<EntityPath>
GetAccessibilityDescribedByEntitiesReckfell.Collections.Array<EntityPath>
# GetAccessibilityDescribedByEntities
C#
public Reckfell.Collections.Array<EntityPath> GetAccessibilityDescribedByEntities();
Returns Reckfell.Collections.Array<EntityPath>
GetAccessibilityDescriptionstring
# GetAccessibilityDescription
C#
public string GetAccessibilityDescription();
Returns string
GetAccessibilityFlowToEntitiesReckfell.Collections.Array<EntityPath>
# GetAccessibilityFlowToEntities
C#
public Reckfell.Collections.Array<EntityPath> GetAccessibilityFlowToEntities();
Returns Reckfell.Collections.Array<EntityPath>
GetAccessibilityLabeledByEntitiesReckfell.Collections.Array<EntityPath>
# GetAccessibilityLabeledByEntities
C#
public Reckfell.Collections.Array<EntityPath> GetAccessibilityLabeledByEntities();
Returns Reckfell.Collections.Array<EntityPath>
GetAccessibilityLiveAccessibilityServer.AccessibilityLiveMode
# GetAccessibilityLive
C#
public AccessibilityServer.AccessibilityLiveMode GetAccessibilityLive();
Returns AccessibilityServer.AccessibilityLiveMode
GetAccessibilityNamestring
# GetAccessibilityName
C#
public string GetAccessibilityName();
Returns string
GetAnchorfloat
# GetAnchor
C#
public float GetAnchor(Side side);

Returns the anchor for the specified Side. A getter method for Control.AnchorBottom, Control.AnchorLeft, Control.AnchorRight and Control.AnchorTop.

Parameters
NameTypeDefault
sideSide—
Returns float
GetBeginVector2
# GetBegin
C#
public Vector2 GetBegin();

Returns Control.OffsetLeft and Control.OffsetTop. See also Control.Position.

Returns Vector2
GetBoundMinimumSizeVector2
# GetBoundMinimumSize
C#
public Vector2 GetBoundMinimumSize();

Returns the bound value of Control.GetCombinedMinimumSize by Control.GetCombinedMaximumSize. This value is the true minimum size of the container, as the maximum size has priority over the minimum size. For example, if the combined minimum size is (100, 100) and the combined maximum size is (50, 150), the bound minimum size will be (50, 100).

Returns Vector2
GetCombinedMaximumSizeVector2
# GetCombinedMaximumSize
C#
public Vector2 GetCombinedMaximumSize();

Returns the combined maximum size from Control.CustomMaximumSize and Control.GetMaximumSize, as well as the Control.CustomMaximumSize of this node's parent if it is a Control node with Control.PropagateMaximumSize set to true.

Returns Vector2
GetCombinedMinimumSizeVector2
# GetCombinedMinimumSize
C#
public Vector2 GetCombinedMinimumSize();

Returns the combined minimum size from Control.CustomMinimumSize and Control.GetMinimumSize.

Returns Vector2
GetCombinedPivotOffsetVector2
# GetCombinedPivotOffset
C#
public Vector2 GetCombinedPivotOffset();

Returns the combined value of Control.PivotOffset and Control.PivotOffsetRatio, in pixels. The ratio is multiplied by the control's size.

Returns Vector2
GetCursorShapeControl.CursorShape
# GetCursorShape
C#
public Control.CursorShape GetCursorShape(Vector2? atPosition = default);

Virtual method to be implemented by the user. Returns the cursor shape for the position at_position in the control's local coordinates, which will typically be used while hovering over this control. See Control.GetCursorShape. If not overridden, defaults to Control.MouseDefaultCursorShape.

Parameters
NameTypeDefault
atPositionVector2?default
atPosition

If the parameter is null, then the default value is new Vector2(0.0f, 0.0f).

Returns Control.CursorShape
GetCustomMaximumSizeVector2
# GetCustomMaximumSize
C#
public Vector2 GetCustomMaximumSize();
Returns Vector2
GetCustomMinimumSizeVector2
# GetCustomMinimumSize
C#
public Vector2 GetCustomMinimumSize();
Returns Vector2
GetDefaultCursorShapeControl.CursorShape
# GetDefaultCursorShape
C#
public Control.CursorShape GetDefaultCursorShape();
Returns Control.CursorShape
GetEndVector2
# GetEnd
C#
public Vector2 GetEnd();

Returns Control.OffsetRight and Control.OffsetBottom.

Returns Vector2
GetFocusBehaviorRecursiveControl.FocusBehaviorRecursiveEnum
# GetFocusBehaviorRecursive
C#
public Control.FocusBehaviorRecursiveEnum GetFocusBehaviorRecursive();
Returns Control.FocusBehaviorRecursiveEnum
GetFocusModeControl.FocusModeEnum
# GetFocusMode
C#
public Control.FocusModeEnum GetFocusMode();
Returns Control.FocusModeEnum
GetFocusModeWithOverrideControl.FocusModeEnum
# GetFocusModeWithOverride
C#
public Control.FocusModeEnum GetFocusModeWithOverride();

Returns the Control.FocusMode, but takes the Control.FocusBehaviorRecursive into account. If Control.FocusBehaviorRecursive is set to Control.FocusBehaviorRecursiveEnum.Disabled, or it is set to Control.FocusBehaviorRecursiveEnum.Inherited and its ancestor is set to Control.FocusBehaviorRecursiveEnum.Disabled, then this returns Control.FocusModeEnum.None.

Returns Control.FocusModeEnum
GetFocusNeighborEntityPath
# GetFocusNeighbor
C#
public EntityPath GetFocusNeighbor(Side side);

Returns the focus neighbor for the specified Side. A getter method for Control.FocusNeighborBottom, Control.FocusNeighborLeft, Control.FocusNeighborRight and Control.FocusNeighborTop. Note: To find the next Control on the specific Side, even if a neighbor is not assigned, use Control.FindValidFocusNeighbor.

Parameters
NameTypeDefault
sideSide—
Returns EntityPath
GetFocusNextEntityPath
# GetFocusNext
C#
public EntityPath GetFocusNext();
Returns EntityPath
GetFocusPreviousEntityPath
# GetFocusPrevious
C#
public EntityPath GetFocusPrevious();
Returns EntityPath
GetGlobalPositionVector2
# GetGlobalPosition
C#
public Vector2 GetGlobalPosition();
Returns Vector2
GetGlobalRectRect2
# GetGlobalRect
C#
public Rect2 GetGlobalRect();

Returns the position and size of the control relative to the containing canvas. See Control.GlobalPosition and Control.Size. Note: If the node itself or any parent CanvasItem between the node and the canvas have a non default rotation or skew, the resulting size is likely not meaningful. Note: Setting Viewport.GuiSnapControlsToPixels to true can lead to rounding inaccuracies between the displayed control and the returned Rect2.

Returns Rect2
GetHGrowDirectionControl.GrowDirection
# GetHGrowDirection
C#
public Control.GrowDirection GetHGrowDirection();
Returns Control.GrowDirection
GetHSizeFlagsControl.SizeFlags
# GetHSizeFlags
C#
public Control.SizeFlags GetHSizeFlags();
Returns Control.SizeFlags
GetLayoutDirectionControl.LayoutDirectionEnum
# GetLayoutDirection
C#
public Control.LayoutDirectionEnum GetLayoutDirection();
Returns Control.LayoutDirectionEnum
GetMaximumSizeVector2
# GetMaximumSize
C#
public Vector2 GetMaximumSize();

Virtual method to be implemented by the user. Returns the maximum size for this control. Alternative to Control.CustomMaximumSize for controlling maximum size via code. The actual maximum size will be the max value of these two (in each axis separately). If not overridden, defaults to Vector2.Zero. Note: This method will not be called when the script is attached to a Control node that already overrides its maximum size (e.g. ScrollContainer). Note: It is recommended to use Control.GetBoundMinimumSize instead of Control.GetCombinedMinimumSize when implementing this method, as the former respects maximum size limits when calculating the minimum size, while the latter does not.

Returns Vector2
GetMinimumSizeVector2
# GetMinimumSize
C#
public Vector2 GetMinimumSize();

Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to Control.CustomMinimumSize for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). If not overridden, defaults to Vector2.Zero. Note: This method will not be called when the script is attached to a Control node that already overrides its minimum size (e.g. Label, Button, PanelContainer etc.). It can only be used with most basic GUI nodes, like Control, Container, Panel etc.

Returns Vector2
GetMouseBehaviorRecursiveControl.MouseBehaviorRecursiveEnum
# GetMouseBehaviorRecursive
C#
public Control.MouseBehaviorRecursiveEnum GetMouseBehaviorRecursive();
Returns Control.MouseBehaviorRecursiveEnum
GetMouseFilterControl.MouseFilterEnum
# GetMouseFilter
C#
public Control.MouseFilterEnum GetMouseFilter();
Returns Control.MouseFilterEnum
GetMouseFilterWithOverrideControl.MouseFilterEnum
# GetMouseFilterWithOverride
C#
public Control.MouseFilterEnum GetMouseFilterWithOverride();

Returns the Control.MouseFilter, but takes the Control.MouseBehaviorRecursive into account. If Control.MouseBehaviorRecursive is set to Control.MouseBehaviorRecursiveEnum.Disabled, or it is set to Control.MouseBehaviorRecursiveEnum.Inherited and its ancestor is set to Control.MouseBehaviorRecursiveEnum.Disabled, then this returns Control.MouseFilterEnum.Ignore.

Returns Control.MouseFilterEnum
GetOffsetfloat
# GetOffset
C#
public float GetOffset(Side offset);

Returns the offset for the specified Side. A getter method for Control.OffsetBottom, Control.OffsetLeft, Control.OffsetRight and Control.OffsetTop.

Parameters
NameTypeDefault
offsetSide—
Returns float
GetOffsetTransformPivotVector2
# GetOffsetTransformPivot
C#
public Vector2 GetOffsetTransformPivot();
Returns Vector2
GetOffsetTransformPivotRatioVector2
# GetOffsetTransformPivotRatio
C#
public Vector2 GetOffsetTransformPivotRatio();
Returns Vector2
GetOffsetTransformPositionVector2
# GetOffsetTransformPosition
C#
public Vector2 GetOffsetTransformPosition();
Returns Vector2
GetOffsetTransformPositionRatioVector2
# GetOffsetTransformPositionRatio
C#
public Vector2 GetOffsetTransformPositionRatio();
Returns Vector2
GetOffsetTransformRotationfloat
# GetOffsetTransformRotation
C#
public float GetOffsetTransformRotation();
Returns float
GetOffsetTransformScaleVector2
# GetOffsetTransformScale
C#
public Vector2 GetOffsetTransformScale();
Returns Vector2
GetParentAreaSizeVector2
# GetParentAreaSize
C#
public Vector2 GetParentAreaSize();

Returns the width/height occupied in the parent control.

Returns Vector2
GetParentControlControl
# GetParentControl
C#
public Control GetParentControl();

Returns the parent control node.

Returns Control
GetPivotOffsetVector2
# GetPivotOffset
C#
public Vector2 GetPivotOffset();
Returns Vector2
GetPivotOffsetRatioVector2
# GetPivotOffsetRatio
C#
public Vector2 GetPivotOffsetRatio();
Returns Vector2
GetPositionVector2
# GetPosition
C#
public Vector2 GetPosition();
Returns Vector2
GetRectRect2
# GetRect
C#
public Rect2 GetRect();

Returns the position and size of the control in the coordinate system of the containing node. See Control.Position, Control.Scale and Control.Size. Note: If Control.Rotation is not the default rotation, the resulting size is not meaningful. Note: Setting Viewport.GuiSnapControlsToPixels to true can lead to rounding inaccuracies between the displayed control and the returned Rect2.

Returns Rect2
GetRotationfloat
# GetRotation
C#
public float GetRotation();
Returns float
GetRotationDegreesfloat
# GetRotationDegrees
C#
public float GetRotationDegrees();
Returns float
GetScaleVector2
# GetScale
C#
public Vector2 GetScale();
Returns Vector2
GetScreenPositionVector2
# GetScreenPosition
C#
public Vector2 GetScreenPosition();

Returns the position of this Control in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equivalent to get_screen_transform().origin (see CanvasItem.GetScreenTransform). Example: Show a popup at the mouse position:

Returns Vector2
GetShortcutContextEntity
# GetShortcutContext
C#
public Entity GetShortcutContext();
Returns Entity
GetSizeVector2
# GetSize
C#
public Vector2 GetSize();
Returns Vector2
GetStretchRatiofloat
# GetStretchRatio
C#
public float GetStretchRatio();
Returns float
GetThemeTheme
# GetTheme
C#
public Theme GetTheme();
Returns Theme
GetThemeColorColor
# GetThemeColor
C#
public Color GetThemeColor(StringName name, StringName themeType = null);

Returns a Color from the first matching Theme in the tree if that Theme has a color item with the specified name and theme_type. If theme_type is omitted the class name of the current control is used as the type, or Control.ThemeTypeVariation if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. For the current control its local overrides are considered first (see Control.AddThemeColorOverride), then its assigned Control.Theme. After the current control, each parent control and its assigned Control.Theme are considered; controls without a Control.Theme assigned are skipped. If no matching Theme is found in the tree, the custom project Theme (see ProjectSettings.gui/theme/custom) and the default Theme are used (see ThemeDB).

C#
public override void _Ready()
{
    // Get the font color defined for the current Control's class, if it exists.
    Modulate = GetThemeColor("font_color");
    // Get the font color defined for the Button class.
    Modulate = GetThemeColor("font_color", "Button");
}
Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns Color
GetThemeConstantint
# GetThemeConstant
C#
public int GetThemeConstant(StringName name, StringName themeType = null);

Returns a constant from the first matching Theme in the tree if that Theme has a constant item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns int
GetThemeDefaultBaseScalefloat
# GetThemeDefaultBaseScale
C#
public float GetThemeDefaultBaseScale();

Returns the default base scale value from the first matching Theme in the tree if that Theme has a valid Theme.DefaultBaseScale value. See Control.GetThemeColor for details.

Returns float
GetThemeDefaultFontFont
# GetThemeDefaultFont
C#
public Font GetThemeDefaultFont();

Returns the default font from the first matching Theme in the tree if that Theme has a valid Theme.DefaultFont value. See Control.GetThemeColor for details.

Returns Font
GetThemeDefaultFontSizeint
# GetThemeDefaultFontSize
C#
public int GetThemeDefaultFontSize();

Returns the default font size value from the first matching Theme in the tree if that Theme has a valid Theme.DefaultFontSize value. See Control.GetThemeColor for details.

Returns int
GetThemeFontFont
# GetThemeFont
C#
public Font GetThemeFont(StringName name, StringName themeType = null);

Returns a Font from the first matching Theme in the tree if that Theme has a font item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns Font
GetThemeFontSizeint
# GetThemeFontSize
C#
public int GetThemeFontSize(StringName name, StringName themeType = null);

Returns a font size from the first matching Theme in the tree if that Theme has a font size item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns int
GetThemeIconTexture2D
# GetThemeIcon
C#
public Texture2D GetThemeIcon(StringName name, StringName themeType = null);

Returns an icon from the first matching Theme in the tree if that Theme has an icon item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns Texture2D
GetThemeSoundAudioStream
# GetThemeSound
C#
public AudioStream GetThemeSound(StringName name, StringName themeType = null);

Returns a sound from the first matching Theme in the tree if that Theme has a sound item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns AudioStream
GetThemeStyleboxStyleBox
# GetThemeStylebox
C#
public StyleBox GetThemeStylebox(StringName name, StringName themeType = null);

Returns a StyleBox from the first matching Theme in the tree if that Theme has a stylebox item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns StyleBox
GetThemeTypeVariationStringName
# GetThemeTypeVariation
C#
public StringName GetThemeTypeVariation();
Returns StringName
GetTooltipstring
# GetTooltip
C#
public string GetTooltip(Vector2? atPosition = default);

Virtual method to be implemented by the user. Returns the tooltip text for the position at_position in the control's local coordinates, which will typically appear when the cursor is resting over this control. See Control.GetTooltip. Note: If this method returns an empty string and Control._MakeCustomTooltip is not overridden, no tooltip is displayed.

Parameters
NameTypeDefault
atPositionVector2?default
atPosition

If the parameter is null, then the default value is new Vector2(0.0f, 0.0f).

Returns string
GetTooltipAutoTranslateModeEntity.AutoTranslateModeEnum
# GetTooltipAutoTranslateMode
C#
public Entity.AutoTranslateModeEnum GetTooltipAutoTranslateMode();
Returns Entity.AutoTranslateModeEnum
GetTooltipTextstring
# GetTooltipText
C#
public string GetTooltipText();
Returns string
GetTranslationContextStringName
# GetTranslationContext
C#
public StringName GetTranslationContext();
Returns StringName
GetVGrowDirectionControl.GrowDirection
# GetVGrowDirection
C#
public Control.GrowDirection GetVGrowDirection();
Returns Control.GrowDirection
GetVSizeFlagsControl.SizeFlags
# GetVSizeFlags
C#
public Control.SizeFlags GetVSizeFlags();
Returns Control.SizeFlags
GrabClickFocusvoid
# GrabClickFocus
C#
public void GrabClickFocus();

Creates an InputEventMouseButton that attempts to click the control. If the event is received, the control gains focus.

C#
public override void _Process(double delta)
{
    GrabClickFocus(); // When clicking another Control node, this node will be clicked instead.
}
GrabFocus2 overloads
# GrabFocus · 1/2
C#
public void GrabFocus();

Assigns focus to this visible eligible control. Deferring initial selection until hierarchy readiness is useful. Hiding releases focus; assign it again when opening a screen. The hideFocus overload controls the indicator, not input availability.

# GrabFocus · 2/2
C#
public void GrabFocus(bool hideFocus = false);

Assigns focus to this visible eligible control. Deferring initial selection until hierarchy readiness is useful. Hiding releases focus; assign it again when opening a screen. The hideFocus overload controls the indicator, not input availability.

Parameters
NameTypeDefault
hideFocusboolfalse
HasFocus2 overloads
# HasFocus · 1/2
C#
public bool HasFocus();

Returns true if this is the current focused control. See Control.FocusMode. If ignore_hidden_focus is true, controls that have their focus hidden will always return false. Hidden focus happens automatically when controls gain focus via mouse input, or manually using Control.GrabFocus with hide_focus set to true.

Returns bool
# HasFocus · 2/2
C#
public bool HasFocus(bool ignoreHiddenFocus = false);

Returns true if this is the current focused control. See Control.FocusMode. If ignore_hidden_focus is true, controls that have their focus hidden will always return false. Hidden focus happens automatically when controls gain focus via mouse input, or manually using Control.GrabFocus with hide_focus set to true.

Parameters
NameTypeDefault
ignoreHiddenFocusboolfalse
Returns bool
HasThemeColorbool
# HasThemeColor
C#
public bool HasThemeColor(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a color item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeColorOverridebool
# HasThemeColorOverride
C#
public bool HasThemeColorOverride(StringName name);

Returns true if there is a local override for a theme Color with the specified name in this Control node. See Control.AddThemeColorOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeConstantbool
# HasThemeConstant
C#
public bool HasThemeConstant(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a constant item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeConstantOverridebool
# HasThemeConstantOverride
C#
public bool HasThemeConstantOverride(StringName name);

Returns true if there is a local override for a theme constant with the specified name in this Control node. See Control.AddThemeConstantOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeFontbool
# HasThemeFont
C#
public bool HasThemeFont(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a font item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeFontOverridebool
# HasThemeFontOverride
C#
public bool HasThemeFontOverride(StringName name);

Returns true if there is a local override for a theme Font with the specified name in this Control node. See Control.AddThemeFontOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeFontSizebool
# HasThemeFontSize
C#
public bool HasThemeFontSize(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a font size item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeFontSizeOverridebool
# HasThemeFontSizeOverride
C#
public bool HasThemeFontSizeOverride(StringName name);

Returns true if there is a local override for a theme font size with the specified name in this Control node. See Control.AddThemeFontSizeOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeIconbool
# HasThemeIcon
C#
public bool HasThemeIcon(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has an icon item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeIconOverridebool
# HasThemeIconOverride
C#
public bool HasThemeIconOverride(StringName name);

Returns true if there is a local override for a theme icon with the specified name in this Control node. See Control.AddThemeIconOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeSoundbool
# HasThemeSound
C#
public bool HasThemeSound(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a sound item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeSoundOverridebool
# HasThemeSoundOverride
C#
public bool HasThemeSoundOverride(StringName name);

Returns true if there is a local override for a theme sound with the specified name in this Control node. See Control.AddThemeSoundOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
HasThemeStyleboxbool
# HasThemeStylebox
C#
public bool HasThemeStylebox(StringName name, StringName themeType = null);

Returns true if there is a matching Theme in the tree that has a stylebox item with the specified name and theme_type. See Control.GetThemeColor for details.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringNamenull
Returns bool
HasThemeStyleboxOverridebool
# HasThemeStyleboxOverride
C#
public bool HasThemeStyleboxOverride(StringName name);

Returns true if there is a local override for a theme StyleBox with the specified name in this Control node. See Control.AddThemeStyleboxOverride.

Parameters
NameTypeDefault
nameStringName—
Returns bool
IsAutoTranslatingbool
# IsAutoTranslating
C#
public bool IsAutoTranslating();
Returns bool
IsClippingContentsbool
# IsClippingContents
C#
public bool IsClippingContents();
Returns bool
IsDragSuccessfulbool
# IsDragSuccessful
C#
public bool IsDragSuccessful();

Returns true if a drag operation is successful. Alternative to Viewport.GuiIsDragSuccessful. Best used with Entity.NotificationDragEnd.

Returns bool
IsForcePassScrollEventsbool
# IsForcePassScrollEvents
C#
public bool IsForcePassScrollEvents();
Returns bool
IsLayoutRtlbool
# IsLayoutRtl
C#
public bool IsLayoutRtl();

Returns the effective Control layout direction using LayoutDirection and inheritance. Does not determine the direction of every text string or switch the game locale.

Returns bool

true for an effective right-to-left layout, otherwise false. This is configuration state, not proof that the entire UI renders correctly.

IsLocalizingNumeralSystembool
# IsLocalizingNumeralSystem
C#
public bool IsLocalizingNumeralSystem();
Returns bool
IsOffsetTransformEnabledbool
# IsOffsetTransformEnabled
C#
public bool IsOffsetTransformEnabled();
Returns bool
IsOffsetTransformVisualOnlybool
# IsOffsetTransformVisualOnly
C#
public bool IsOffsetTransformVisualOnly();
Returns bool
IsPropagatingMaximumSizebool
# IsPropagatingMaximumSize
C#
public bool IsPropagatingMaximumSize();
Returns bool
ReleaseFocusvoid
# ReleaseFocus
C#
public void ReleaseFocus();

Give up the focus. No other control will be able to receive input.

RemoveThemeColorOverridevoid
# RemoveThemeColorOverride
C#
public void RemoveThemeColorOverride(StringName name);

Removes a local override for a theme Color with the specified name previously added by Control.AddThemeColorOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeConstantOverridevoid
# RemoveThemeConstantOverride
C#
public void RemoveThemeConstantOverride(StringName name);

Removes a local override for a theme constant with the specified name previously added by Control.AddThemeConstantOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeFontOverridevoid
# RemoveThemeFontOverride
C#
public void RemoveThemeFontOverride(StringName name);

Removes a local override for a theme Font with the specified name previously added by Control.AddThemeFontOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeFontSizeOverridevoid
# RemoveThemeFontSizeOverride
C#
public void RemoveThemeFontSizeOverride(StringName name);

Removes a local override for a theme font size with the specified name previously added by Control.AddThemeFontSizeOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeIconOverridevoid
# RemoveThemeIconOverride
C#
public void RemoveThemeIconOverride(StringName name);

Removes a local override for a theme icon with the specified name previously added by Control.AddThemeIconOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeSoundOverridevoid
# RemoveThemeSoundOverride
C#
public void RemoveThemeSoundOverride(StringName name);

Removes a local override for a theme sound with the specified name previously added by Control.AddThemeSoundOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
RemoveThemeStyleboxOverridevoid
# RemoveThemeStyleboxOverride
C#
public void RemoveThemeStyleboxOverride(StringName name);

Removes a local override for a theme StyleBox with the specified name previously added by Control.AddThemeStyleboxOverride or via the Inspector dock.

Parameters
NameTypeDefault
nameStringName—
ResetSizevoid
# ResetSize
C#
public void ResetSize();

Resets the size to Control.GetCombinedMinimumSize. This is equivalent to calling set_size(Vector2()) (or any size below the minimum).

SetAccessibilityControlsEntitiesvoid
# SetAccessibilityControlsEntities
C#
public void SetAccessibilityControlsEntities(Reckfell.Collections.Array<EntityPath> entityPath);
Parameters
NameTypeDefault
entityPathReckfell.Collections.Array<EntityPath>—
SetAccessibilityDescribedByEntitiesvoid
# SetAccessibilityDescribedByEntities
C#
public void SetAccessibilityDescribedByEntities(Reckfell.Collections.Array<EntityPath> entityPath);
Parameters
NameTypeDefault
entityPathReckfell.Collections.Array<EntityPath>—
SetAccessibilityDescriptionvoid
# SetAccessibilityDescription
C#
public void SetAccessibilityDescription(string description);
Parameters
NameTypeDefault
descriptionstring—
SetAccessibilityFlowToEntitiesvoid
# SetAccessibilityFlowToEntities
C#
public void SetAccessibilityFlowToEntities(Reckfell.Collections.Array<EntityPath> entityPath);
Parameters
NameTypeDefault
entityPathReckfell.Collections.Array<EntityPath>—
SetAccessibilityLabeledByEntitiesvoid
# SetAccessibilityLabeledByEntities
C#
public void SetAccessibilityLabeledByEntities(Reckfell.Collections.Array<EntityPath> entityPath);
Parameters
NameTypeDefault
entityPathReckfell.Collections.Array<EntityPath>—
SetAccessibilityLive2 overloads
# SetAccessibilityLive · 1/2
C#
public void SetAccessibilityLive(AccessibilityServer.AccessibilityLiveMode mode);
Parameters
NameTypeDefault
modeAccessibilityServer.AccessibilityLiveMode—
# SetAccessibilityLive · 2/2
C#
public void SetAccessibilityLive(DisplayServer.AccessibilityLiveMode mode);
Parameters
NameTypeDefault
modeDisplayServer.AccessibilityLiveMode—
SetAccessibilityNamevoid
# SetAccessibilityName
C#
public void SetAccessibilityName(string name);
Parameters
NameTypeDefault
namestring—
SetAnchorvoid
# SetAnchor
C#
public void SetAnchor(Side side, float anchor, bool keepOffset = false, bool pushOppositeAnchor = true);

Sets the anchor for the specified Side to anchor. A setter method for Control.AnchorBottom, Control.AnchorLeft, Control.AnchorRight and Control.AnchorTop. If keep_offset is true, offsets aren't updated after this operation. If push_opposite_anchor is true and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If push_opposite_anchor was false, the left anchor would get value 0.5.

Parameters
NameTypeDefault
sideSide—
anchorfloat—
keepOffsetboolfalse
pushOppositeAnchorbooltrue
SetAnchorAndOffsetvoid
# SetAnchorAndOffset
C#
public void SetAnchorAndOffset(Side side, float anchor, float offset, bool pushOppositeAnchor = false);

Works the same as Control.SetAnchor, but instead of keep_offset argument and automatic update of offset, it allows to set the offset yourself (see Control.SetOffset).

Parameters
NameTypeDefault
sideSide—
anchorfloat—
offsetfloat—
pushOppositeAnchorboolfalse
SetAnchorsAndOffsetsPresetvoid
# SetAnchorsAndOffsetsPreset
C#
public void SetAnchorsAndOffsetsPreset(Control.LayoutPreset preset, Control.LayoutPresetMode resizeMode = Control.LayoutPresetMode.Minsize, int margin = 0);

Assigns standard anchors and offsets using the selected size-retention mode and margin. FullRect fills the parent anchorable area with that margin unless size constraints interfere. A Container parent can subsequently own the rectangle itself.

Parameters
NameTypeDefault
presetControl.LayoutPreset—
resizeModeControl.LayoutPresetModeControl.LayoutPresetMode.Minsize
marginint0
SetAnchorsPresetvoid
# SetAnchorsPreset
C#
public void SetAnchorsPreset(Control.LayoutPreset preset, bool keepOffsets = false);

Assigns a standard anchor set; keepOffsets controls offset retention. To set anchors and offsets together, use SetAnchorsAndOffsetsPreset or configure offsets explicitly after the preset.

Parameters
NameTypeDefault
presetControl.LayoutPreset—
keepOffsetsboolfalse
SetAutoTranslatevoid
# SetAutoTranslate
C#
public void SetAutoTranslate(bool enable);
Parameters
NameTypeDefault
enablebool—
SetBeginvoid
# SetBegin
C#
public void SetBegin(Vector2 position);

Sets Control.OffsetLeft and Control.OffsetTop at the same time. Equivalent of changing Control.Position.

Parameters
NameTypeDefault
positionVector2—
SetClipContentsvoid
# SetClipContents
C#
public void SetClipContents(bool enable);
Parameters
NameTypeDefault
enablebool—
SetCustomMaximumSizevoid
# SetCustomMaximumSize
C#
public void SetCustomMaximumSize(Vector2 size);
Parameters
NameTypeDefault
sizeVector2—
SetCustomMinimumSizevoid
# SetCustomMinimumSize
C#
public void SetCustomMinimumSize(Vector2 size);
Parameters
NameTypeDefault
sizeVector2—
SetDefaultCursorShapevoid
# SetDefaultCursorShape
C#
public void SetDefaultCursorShape(Control.CursorShape shape);
Parameters
NameTypeDefault
shapeControl.CursorShape—
SetDragForwardingvoid
# SetDragForwarding
C#
public void SetDragForwarding(Callable dragFunc, Callable canDropFunc, Callable dropFunc);

Sets the given callables to be used instead of the control's own drag-and-drop virtual methods. If a callable is empty, its respective virtual method is used as normal. The arguments for each callable should be exactly the same as their respective virtual methods, which would be:

Parameters
NameTypeDefault
dragFuncCallable—
canDropFuncCallable—
dropFuncCallable—
SetDragPreviewvoid
# SetDragPreview
C#
public void SetDragPreview(Control control);

Shows the given control at the mouse pointer. A good time to call this method is in Control._GetDragData. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.

C#
[Export]
private Color _color = new Color(1, 0, 0, 1);

public override Variant _GetDragData(Vector2 atPosition)
{
    // Use a control that is not in the tree
    var cpb = new ColorPickerButton();
    cpb.Color = _color;
    cpb.Size = new Vector2(50, 50);
    SetDragPreview(cpb);
    return _color;
}
Parameters
NameTypeDefault
controlControl—
SetEndvoid
# SetEnd
C#
public void SetEnd(Vector2 position);

Sets Control.OffsetRight and Control.OffsetBottom at the same time.

Parameters
NameTypeDefault
positionVector2—
SetFocusBehaviorRecursivevoid
# SetFocusBehaviorRecursive
C#
public void SetFocusBehaviorRecursive(Control.FocusBehaviorRecursiveEnum focusBehaviorRecursive);
Parameters
NameTypeDefault
focusBehaviorRecursiveControl.FocusBehaviorRecursiveEnum—
SetFocusModevoid
# SetFocusMode
C#
public void SetFocusMode(Control.FocusModeEnum mode);
Parameters
NameTypeDefault
modeControl.FocusModeEnum—
SetFocusNeighborvoid
# SetFocusNeighbor
C#
public void SetFocusNeighbor(Side side, EntityPath neighbor);

Sets the focus neighbor for the specified Side to the Control at neighbor node path. A setter method for Control.FocusNeighborBottom, Control.FocusNeighborLeft, Control.FocusNeighborRight and Control.FocusNeighborTop.

Parameters
NameTypeDefault
sideSide—
neighborEntityPath—
SetFocusNextvoid
# SetFocusNext
C#
public void SetFocusNext(EntityPath next);
Parameters
NameTypeDefault
nextEntityPath—
SetFocusPreviousvoid
# SetFocusPrevious
C#
public void SetFocusPrevious(EntityPath previous);
Parameters
NameTypeDefault
previousEntityPath—
SetForcePassScrollEventsvoid
# SetForcePassScrollEvents
C#
public void SetForcePassScrollEvents(bool forcePassScrollEvents);
Parameters
NameTypeDefault
forcePassScrollEventsbool—
SetGlobalPositionvoid
# SetGlobalPosition
C#
public void SetGlobalPosition(Vector2 position, bool keepOffsets = false);

Sets the Control.GlobalPosition to given Control.Position. If keep_offsets is true, control's anchors will be updated instead of offsets.

Parameters
NameTypeDefault
positionVector2—
keepOffsetsboolfalse
SetHGrowDirectionvoid
# SetHGrowDirection
C#
public void SetHGrowDirection(Control.GrowDirection direction);
Parameters
NameTypeDefault
directionControl.GrowDirection—
SetHSizeFlagsvoid
# SetHSizeFlags
C#
public void SetHSizeFlags(Control.SizeFlags flags);
Parameters
NameTypeDefault
flagsControl.SizeFlags—
SetLayoutDirectionvoid
# SetLayoutDirection
C#
public void SetLayoutDirection(Control.LayoutDirectionEnum direction);
Parameters
NameTypeDefault
directionControl.LayoutDirectionEnum—
SetLocalizeNumeralSystemvoid
# SetLocalizeNumeralSystem
C#
public void SetLocalizeNumeralSystem(bool enable);
Parameters
NameTypeDefault
enablebool—
SetMouseBehaviorRecursivevoid
# SetMouseBehaviorRecursive
C#
public void SetMouseBehaviorRecursive(Control.MouseBehaviorRecursiveEnum mouseBehaviorRecursive);
Parameters
NameTypeDefault
mouseBehaviorRecursiveControl.MouseBehaviorRecursiveEnum—
SetMouseFiltervoid
# SetMouseFilter
C#
public void SetMouseFilter(Control.MouseFilterEnum filter);
Parameters
NameTypeDefault
filterControl.MouseFilterEnum—
SetOffsetvoid
# SetOffset
C#
public void SetOffset(Side side, float offset);

Sets the offset for the specified Side to offset. A setter method for Control.OffsetBottom, Control.OffsetLeft, Control.OffsetRight and Control.OffsetTop.

Parameters
NameTypeDefault
sideSide—
offsetfloat—
SetOffsetTransformEnabledvoid
# SetOffsetTransformEnabled
C#
public void SetOffsetTransformEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetOffsetTransformPivotvoid
# SetOffsetTransformPivot
C#
public void SetOffsetTransformPivot(Vector2 pivot);
Parameters
NameTypeDefault
pivotVector2—
SetOffsetTransformPivotRatiovoid
# SetOffsetTransformPivotRatio
C#
public void SetOffsetTransformPivotRatio(Vector2 pivot);
Parameters
NameTypeDefault
pivotVector2—
SetOffsetTransformPositionvoid
# SetOffsetTransformPosition
C#
public void SetOffsetTransformPosition(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetOffsetTransformPositionRatiovoid
# SetOffsetTransformPositionRatio
C#
public void SetOffsetTransformPositionRatio(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetOffsetTransformRotationvoid
# SetOffsetTransformRotation
C#
public void SetOffsetTransformRotation(float rotation);
Parameters
NameTypeDefault
rotationfloat—
SetOffsetTransformScalevoid
# SetOffsetTransformScale
C#
public void SetOffsetTransformScale(Vector2 scale);
Parameters
NameTypeDefault
scaleVector2—
SetOffsetTransformVisualOnlyvoid
# SetOffsetTransformVisualOnly
C#
public void SetOffsetTransformVisualOnly(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetOffsetsPresetvoid
# SetOffsetsPreset
C#
public void SetOffsetsPreset(Control.LayoutPreset preset, Control.LayoutPresetMode resizeMode = Control.LayoutPresetMode.Minsize, int margin = 0);

Sets the offsets to a preset from Control.LayoutPreset enum. This is the code equivalent to using the Layout menu in the 2D editor. Use parameter resize_mode with constants from Control.LayoutPresetMode to better determine the resulting size of the Control. Constant size will be ignored if used with presets that change size, e.g. Control.LayoutPreset.LeftWide. Use parameter margin to determine the gap between the Control and the edges.

Parameters
NameTypeDefault
presetControl.LayoutPreset—
resizeModeControl.LayoutPresetModeControl.LayoutPresetMode.Minsize
marginint0
SetPivotOffsetvoid
# SetPivotOffset
C#
public void SetPivotOffset(Vector2 pivotOffset);
Parameters
NameTypeDefault
pivotOffsetVector2—
SetPivotOffsetRatiovoid
# SetPivotOffsetRatio
C#
public void SetPivotOffsetRatio(Vector2 ratio);
Parameters
NameTypeDefault
ratioVector2—
SetPositionvoid
# SetPosition
C#
public void SetPosition(Vector2 position, bool keepOffsets = false);

Sets the Control.Position to given Control.Position. If keep_offsets is true, control's anchors will be updated instead of offsets.

Parameters
NameTypeDefault
positionVector2—
keepOffsetsboolfalse
SetPropagateMaximumSizevoid
# SetPropagateMaximumSize
C#
public void SetPropagateMaximumSize(bool enable);
Parameters
NameTypeDefault
enablebool—
SetRotationvoid
# SetRotation
C#
public void SetRotation(float radians);
Parameters
NameTypeDefault
radiansfloat—
SetRotationDegreesvoid
# SetRotationDegrees
C#
public void SetRotationDegrees(float degrees);
Parameters
NameTypeDefault
degreesfloat—
SetScalevoid
# SetScale
C#
public void SetScale(Vector2 scale);
Parameters
NameTypeDefault
scaleVector2—
SetShortcutContextvoid
# SetShortcutContext
C#
public void SetShortcutContext(Entity node);
Parameters
NameTypeDefault
nodeEntity—
SetSizevoid
# SetSize
C#
public void SetSize(Vector2 size, bool keepOffsets = false);

Sets the size (see Control.Size). If keep_offsets is true, control's anchors will be updated instead of offsets.

Parameters
NameTypeDefault
sizeVector2—
keepOffsetsboolfalse
SetStretchRatiovoid
# SetStretchRatio
C#
public void SetStretchRatio(float ratio);
Parameters
NameTypeDefault
ratiofloat—
SetThemevoid
# SetTheme
C#
public void SetTheme(Theme theme);
Parameters
NameTypeDefault
themeTheme—
SetThemeTypeVariationvoid
# SetThemeTypeVariation
C#
public void SetThemeTypeVariation(StringName themeType);
Parameters
NameTypeDefault
themeTypeStringName—
SetTooltipAutoTranslateModevoid
# SetTooltipAutoTranslateMode
C#
public void SetTooltipAutoTranslateMode(Entity.AutoTranslateModeEnum mode);
Parameters
NameTypeDefault
modeEntity.AutoTranslateModeEnum—
SetTooltipTextvoid
# SetTooltipText
C#
public void SetTooltipText(string hint);
Parameters
NameTypeDefault
hintstring—
SetTranslationContextvoid
# SetTranslationContext
C#
public void SetTranslationContext(StringName context);
Parameters
NameTypeDefault
contextStringName—
SetVGrowDirectionvoid
# SetVGrowDirection
C#
public void SetVGrowDirection(Control.GrowDirection direction);
Parameters
NameTypeDefault
directionControl.GrowDirection—
SetVSizeFlagsvoid
# SetVSizeFlags
C#
public void SetVSizeFlags(Control.SizeFlags flags);
Parameters
NameTypeDefault
flagsControl.SizeFlags—
UpdateMaximumSizevoid
# UpdateMaximumSize
C#
public void UpdateMaximumSize();

Invalidates the maximum size cache in this node and in child nodes with CanvasItem.TopLevel set to false. Intended to be used with Control.GetMaximumSize when the return value is changed. Setting Control.CustomMaximumSize directly calls this method automatically. Note: Calling this method also calls Control.UpdateMinimumSize since the combined minimum size may be affected by the maximum size change.

UpdateMinimumSizevoid
# UpdateMinimumSize
C#
public void UpdateMinimumSize();

Invalidates the minimum size cache in this node and in parent nodes up to top level. Intended to be used with Control.GetMinimumSize when the return value is changed. Setting Control.CustomMinimumSize directly calls this method automatically.

WarpMousevoid
# WarpMouse
C#
public void WarpMouse(Vector2 position);

Moves the mouse cursor to Control.Position, relative to Control.Position of this Control. Note: Control.WarpMouse is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.

Parameters
NameTypeDefault
positionVector2—
_AccessibilityGetContextualInfostring
# _AccessibilityGetContextualInfo
C#
public virtual string _AccessibilityGetContextualInfo();

Return the description of the keyboard shortcuts and other contextual help for this control.

Returns string
_CanDropDatabool
# _CanDropData
C#
public virtual bool _CanDropData(Vector2 atPosition, Variant data);

Reckfell calls this method to test if data from a control's Control._GetDragData can be dropped at at_position. at_position is local to this control. This method should only be used to test the data. Process the data in Control._DropData. Note: If the drag was initiated by a keyboard shortcut or Control.AccessibilityDrag, at_position is set to Vector2.Inf, and the currently selected item/text position should be used as the drop position.

C#
public override bool _CanDropData(Vector2 atPosition, Variant data)
{
    // Check position if it is relevant to you
    // Otherwise, just check data
    return data.VariantType == Variant.Type.Dictionary && data.AsReckfellDictionary().ContainsKey("expected");
}
Parameters
NameTypeDefault
atPositionVector2—
dataVariant—
Returns bool
_DropDatavoid
# _DropData
C#
public virtual void _DropData(Vector2 atPosition, Variant data);

Reckfell calls this method to pass you the data from a control's Control._GetDragData result. Reckfell first calls Control._CanDropData to test if data is allowed to drop at at_position where at_position is local to this control. Note: If the drag was initiated by a keyboard shortcut or Control.AccessibilityDrag, at_position is set to Vector2.Inf, and the currently selected item/text position should be used as the drop position.

C#
public override bool _CanDropData(Vector2 atPosition, Variant data)
{
    return data.VariantType == Variant.Type.Dictionary && data.AsReckfellDictionary().ContainsKey("color");
}

public override void _DropData(Vector2 atPosition, Variant data)
{
    Color color = data.AsReckfellDictionary()["color"].AsColor();
}
Parameters
NameTypeDefault
atPositionVector2—
dataVariant—
_GetAccessibilityContainerNamestring
# _GetAccessibilityContainerName
C#
public virtual string _GetAccessibilityContainerName(Entity node);

Override this method to return a human-readable description of the position of the child node in the custom container, added to the Control.AccessibilityName.

Parameters
NameTypeDefault
nodeEntity—
Returns string
_GetCursorShapeint
# _GetCursorShape
C#
public virtual int _GetCursorShape(Vector2 atPosition);

Virtual method to be implemented by the user. Returns the cursor shape for the position at_position in the control's local coordinates, which will typically be used while hovering over this control. See Control.GetCursorShape. If not overridden, defaults to Control.MouseDefaultCursorShape.

Parameters
NameTypeDefault
atPositionVector2—
Returns int
_GetDragDataVariant
# _GetDragData
C#
public virtual Variant _GetDragData(Vector2 atPosition);

Reckfell calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns null if there is no data to drag. Controls that want to receive drop data should implement Control._CanDropData and Control._DropData. at_position is local to this control. Drag may be forced with Control.ForceDrag. A preview that will follow the mouse that should represent the data can be set with Control.SetDragPreview. A good time to set the preview is in this method. Note: If the drag was initiated by a keyboard shortcut or Control.AccessibilityDrag, at_position is set to Vector2.Inf, and the currently selected item/text position should be used as the drag position.

C#
public override Variant _GetDragData(Vector2 atPosition)
{
    var myData = MakeData(); // This is your custom method generating the drag data.
    SetDragPreview(MakePreview(myData)); // This is your custom method generating the preview of the drag data.
    return myData;
}
Parameters
NameTypeDefault
atPositionVector2—
Returns Variant
_GetMaximumSizeVector2
# _GetMaximumSize
C#
public virtual Vector2 _GetMaximumSize();

Virtual method to be implemented by the user. Returns the maximum size for this control. Alternative to Control.CustomMaximumSize for controlling maximum size via code. The actual maximum size will be the max value of these two (in each axis separately). If not overridden, defaults to Vector2.Zero. Note: This method will not be called when the script is attached to a Control node that already overrides its maximum size (e.g. ScrollContainer). Note: It is recommended to use Control.GetBoundMinimumSize instead of Control.GetCombinedMinimumSize when implementing this method, as the former respects maximum size limits when calculating the minimum size, while the latter does not.

Returns Vector2
_GetMinimumSizeVector2
# _GetMinimumSize
C#
public virtual Vector2 _GetMinimumSize();

Returns a custom control's minimum-size requirement. Containers use it during layout; it does not assign Position. Call UpdateMinimumSize when the requirement changes; QueueRedraw is enough for appearance changes without changed requirements.

Returns Vector2
_GetTooltipstring
# _GetTooltip
C#
public virtual string _GetTooltip(Vector2 atPosition);

Virtual method to be implemented by the user. Returns the tooltip text for the position at_position in the control's local coordinates, which will typically appear when the cursor is resting over this control. See Control.GetTooltip. Note: If this method returns an empty string and Control._MakeCustomTooltip is not overridden, no tooltip is displayed.

Parameters
NameTypeDefault
atPositionVector2—
Returns string
_GetTooltipAutoTranslateModeAtEntity.AutoTranslateModeEnum
# _GetTooltipAutoTranslateModeAt
C#
public virtual Entity.AutoTranslateModeEnum _GetTooltipAutoTranslateModeAt(Vector2 atPosition);

Return the auto-translation mode at the given at_position. If not implemented, the Control.TooltipAutoTranslateMode property will be used instead.

Parameters
NameTypeDefault
atPositionVector2—
Returns Entity.AutoTranslateModeEnum
_GuiInputvoid
# _GuiInput
C#
public virtual void _GuiInput(InputEvent @event);

Handles a delivered GUI event. Mouse coordinates are already local to this Control; keyboard events require focus. Call AcceptEvent for an accepted action. The GuiInput signal runs before this virtual callback and can also accept the event.

Parameters
NameTypeDefault
eventInputEvent—
_HasPointbool
# _HasPoint
C#
public virtual bool _HasPoint(Vector2 point);

Virtual method to be implemented by the user. Returns whether the given point is inside this control. If not overridden, default behavior is checking if the point is within the control's Rect. Note: If you want to check if a point is inside the control, you can use Rect2(Vector2.ZERO, size).has_point(point).

Parameters
NameTypeDefault
pointVector2—
Returns bool
_MakeCustomTooltipReckfellObject
# _MakeCustomTooltip
C#
public virtual ReckfellObject _MakeCustomTooltip(string forText);

Virtual method to be implemented by the user. Returns a Control node that should be used as a tooltip instead of the default one. for_text is the return value of Control.GetTooltip. The returned node must be of type Control or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When null or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a PopupPanel, so you should only provide the contents of that panel. That PopupPanel can be themed using Theme.SetStylebox for the type "TooltipPanel" (see Control.TooltipText for an example). Note: The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its Control.CustomMinimumSize to some non-zero value. Note: The node (and any relevant children) should have their CanvasItem.Visible set to true when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. Note: If overridden, this method is called even if Control.GetTooltip returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return null in this method when for_text is empty. Example: Use a constructed node as a tooltip:

C#
public override Control _MakeCustomTooltip(string forText)
{
    var label = new Label();
    label.Text = forText;
    return label;
}

Example: Use a scene instance as a tooltip:

C#
public override Control _MakeCustomTooltip(string forText)
{
    Entity tooltip = ResourceLoader.Load<PackedEntity>("asset://some_tooltip_scene.rprefab").Instantiate();
    tooltip.GetEntity<Label>("Label").Text = forText;
    return tooltip;
}
Parameters
NameTypeDefault
forTextstring—
Returns ReckfellObject
_StructuredTextParserReckfell.Collections.Array<Vector3I>
# _StructuredTextParser
C#
public virtual Reckfell.Collections.Array<Vector3I> _StructuredTextParser(Reckfell.Collections.Array args, string text);

User defined BiDi algorithm override function. Returns an Reckfell.Collections.Array of Vector3I text ranges and text base directions, in the left-to-right order. Ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.

Parameters
NameTypeDefault
argsReckfell.Collections.Array—
textstring—
Returns Reckfell.Collections.Array<Vector3I>

Signals and events10

FocusEnteredEvent
# FocusEntered
C#
public event Action FocusEntered;

Emitted when the node gains focus.

FocusExitedEvent
# FocusExited
C#
public event Action FocusExited;

Emitted when the node loses focus.

GuiInputEvent
# GuiInput
C#
public event Control.GuiInputEventHandler GuiInput;

Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also Control.AcceptEvent. Example: Click on the control to print a message:

C#
public override void _GuiInput(InputEvent @event)
{
    if (@event is InputEventMouseButton mb)
    {
        if (mb.ButtonIndex == MouseButton.Left && mb.Pressed)
        {
            ReckfellApi.Print("I've been clicked D:");
        }
    }
}

If the event inherits InputEventMouse, this method will not be called when:

Handler parameters
NameTypeDefault
eventInputEvent—
MaximumSizeChangedEvent
# MaximumSizeChanged
C#
public event Action MaximumSizeChanged;

Emitted when the node's maximum size changes.

MinimumSizeChangedEvent
# MinimumSizeChanged
C#
public event Action MinimumSizeChanged;

Emitted when the node's minimum size changes.

MouseEnteredEvent
# MouseEntered
C#
public event Action MouseEntered;

Emitted when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect, which Control receives the signal.

MouseExitedEvent
# MouseExited
C#
public event Action MouseExited;

Emitted when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect, which Control receives the signal. Note: If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this:

ResizedEvent
# Resized
C#
public event Action Resized;

Emitted when the control changes size.

SizeFlagsChangedEvent
# SizeFlagsChanged
C#
public event Action SizeFlagsChanged;

Emitted when one of the size flags changes. See Control.SizeFlagsHorizontal and Control.SizeFlagsVertical.

ThemeChangedEvent
# ThemeChanged
C#
public event Action ThemeChanged;

Emitted when the Control.NotificationThemeChanged notification is sent.

Fields and constants11

NotificationFocusEnterField
# NotificationFocusEnter
C#
public const long NotificationFocusEnter = 43;

Sent when the node grabs focus.

NotificationFocusExitField
# NotificationFocusExit
C#
public const long NotificationFocusExit = 44;

Sent when the node loses focus. This notification is sent in reversed order.

NotificationLayoutDirectionChangedField
# NotificationLayoutDirectionChanged
C#
public const long NotificationLayoutDirectionChanged = 49;

Sent when the control layout direction is changed from LTR or RTL or vice versa. This notification is propagated to child Control nodes as result of a change to Control.LayoutDirection.

NotificationMouseEnterField
# NotificationMouseEnter
C#
public const long NotificationMouseEnter = 41;

Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect which Control receives the notification. See also Control.NotificationMouseEnterSelf.

NotificationMouseEnterSelfField
# NotificationMouseEnterSelf
C#
public const long NotificationMouseEnterSelf = 60;

Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect which Control receives the notification. See also Control.NotificationMouseEnter.

NotificationMouseExitField
# NotificationMouseExit
C#
public const long NotificationMouseExit = 42;

Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect which Control receives the notification. See also Control.NotificationMouseExitSelf.

NotificationMouseExitSelfField
# NotificationMouseExitSelf
C#
public const long NotificationMouseExitSelf = 61;

Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its Control.MouseFilter lets the event reach it and regardless if it's currently focused or not. Note: CanvasItem.ZIndex doesn't affect which Control receives the notification. See also Control.NotificationMouseExit.

NotificationResizedField
# NotificationResized
C#
public const long NotificationResized = 40;

Sent when the node changes size. Use Control.Size to get the new size.

NotificationScrollBeginField
# NotificationScrollBegin
C#
public const long NotificationScrollBegin = 47;

Sent when this node is inside a ScrollContainer which has begun being scrolled when dragging the scrollable area with a touch event. This notification is not sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. Note: This signal is only emitted on Android or iOS, or on desktop/web platforms when ProjectSettings.input_devices/pointing/emulate_touch_from_mouse is enabled.

NotificationScrollEndField
# NotificationScrollEnd
C#
public const long NotificationScrollEnd = 48;

Sent when this node is inside a ScrollContainer which has stopped being scrolled when dragging the scrollable area with a touch event. This notification is not sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. Note: This signal is only emitted on Android or iOS, or on desktop/web platforms when ProjectSettings.input_devices/pointing/emulate_touch_from_mouse is enabled.

NotificationThemeChangedField
# NotificationThemeChanged
C#
public const long NotificationThemeChanged = 45;

Sent when the node needs to refresh its theme items. This happens in one of the following cases:

  • The Control.Theme property is changed on this node or any of its ancestors.
  • The Control.ThemeTypeVariation property is changed on this node.
  • One of the node's theme property overrides is changed.
  • The node enters the scene tree. Note: As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. Note: This notification is received alongside Entity.NotificationEnterTree, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using Entity.IsEntityReady.

Control.Anchor

ValueDescription
Begin = 0

Snaps one of the 4 anchor's sides to the origin of the node's Rect, in the top left. Use it with one of the anchor_* member variables, like Control.AnchorLeft. To change all 4 anchors at once, use Control.SetAnchorsPreset.

End = 1

Snaps one of the 4 anchor's sides to the end of the node's Rect, in the bottom right. Use it with one of the anchor_* member variables, like Control.AnchorLeft. To change all 4 anchors at once, use Control.SetAnchorsPreset.

Control.CursorShape

ValueDescription
Arrow = 0

Show the system's arrow mouse cursor when the user hovers the node. Use with Control.MouseDefaultCursorShape.

Bdiagsize = 11

Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically.

Busy = 5

Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass.

CanDrop = 7

Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock.

Cross = 3

Show the system's cross mouse cursor when the user hovers the node.

Drag = 6

Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock.

Fdiagsize = 12

Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of Control.CursorShape.Bdiagsize. It tells the user they can resize the window or the panel both horizontally and vertically.

Forbidden = 8

Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle.

Help = 16

Show the system's help mouse cursor when the user hovers the node, a question mark.

Hsize = 10

Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally.

Hsplit = 15

Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as Control.CursorShape.Hsize.

Ibeam = 1

Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text.

Move = 13

Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely.

PointingHand = 2

Show the system's pointing hand mouse cursor when the user hovers the node.

Vsize = 9

Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically.

Vsplit = 14

Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as Control.CursorShape.Vsize.

Wait = 4

Show the system's wait mouse cursor when the user hovers the node. Often an hourglass.

Control.FocusBehaviorRecursiveEnum

ValueDescription
Disabled = 1

Prevents the control from getting focused. Control.GetFocusModeWithOverride will return Control.FocusModeEnum.None.

Enabled = 2

Allows the control to be focused, depending on the Control.FocusMode. This can be used to ignore the parent's Control.FocusBehaviorRecursive. Control.GetFocusModeWithOverride will return the Control.FocusMode.

Inherited = 0

Inherits the Control.FocusBehaviorRecursive from the parent control. If there is no parent control, this is the same as Control.FocusBehaviorRecursiveEnum.Enabled.

Control.FocusModeEnum

ValueDescription
Accessibility = 3

The node can grab focus only when screen reader is active. Use with Control.FocusMode.

All = 2

The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with Control.FocusMode.

Click = 1

The node can only grab focus on mouse clicks. Use with Control.FocusMode.

None = 0

The node cannot grab focus. Use with Control.FocusMode.

Control.GrowDirection

ValueDescription
Begin = 0

The control will grow/shrink to the left or top if its size is changed to be larger/smaller than its current size on the respective axis.

Both = 2

The control will grow/shrink in both directions equally if its size is changed to be larger/smaller than its current size.

End = 1

The control will grow/shrink to the right or bottom if its size is changed to be larger/smaller than its current size on the respective axis.

Control.LayoutDirectionEnum

ValueDescription
ApplicationLocale = 1

Automatic layout direction, determined from the current locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language (unless said language is configured as a fallback in ProjectSettings.internationalization/locale/fallback). For all other languages (or if no valid translation file is found by Reckfell), left-to-right layout direction is used. If using TextServerFallback (ProjectSettings.internationalization/rendering/text_driver), left-to-right layout direction is always used regardless of the language. Right-to-left layout direction can also be forced using ProjectSettings.internationalization/rendering/force_right_to_left_layout_direction.

Inherited = 0

Automatic layout direction, determined from the parent control layout direction.

Locale = 1
Ltr = 2

Left-to-right layout direction.

Max = 5

Represents the size of the Control.LayoutDirectionEnum enum.

Rtl = 3

Right-to-left layout direction.

SystemLocale = 4

Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language. For all other languages (or if no valid translation file is found by Reckfell), left-to-right layout direction is used. If using TextServerFallback (ProjectSettings.internationalization/rendering/text_driver), left-to-right layout direction is always used regardless of the language.

Control.LayoutPreset

ValueDescription
BottomLeft = 2

Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with Control.SetAnchorsPreset.

BottomRight = 3

Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with Control.SetAnchorsPreset.

BottomWide = 12

Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with Control.SetAnchorsPreset.

Center = 8

Snap all 4 anchors to the center of the parent control's bounds. Use with Control.SetAnchorsPreset.

CenterBottom = 7

Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with Control.SetAnchorsPreset.

CenterLeft = 4

Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with Control.SetAnchorsPreset.

CenterRight = 6

Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with Control.SetAnchorsPreset.

CenterTop = 5

Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with Control.SetAnchorsPreset.

FullRect = 15

Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the Control will fit its parent control. Use with Control.SetAnchorsPreset.

HcenterWide = 14

Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with Control.SetAnchorsPreset.

LeftWide = 9

Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with Control.SetAnchorsPreset.

RightWide = 11

Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with Control.SetAnchorsPreset.

TopLeft = 0

Snap all 4 anchors to the top-left of the parent control's bounds. Use with Control.SetAnchorsPreset.

TopRight = 1

Snap all 4 anchors to the top-right of the parent control's bounds. Use with Control.SetAnchorsPreset.

TopWide = 10

Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with Control.SetAnchorsPreset.

VcenterWide = 13

Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with Control.SetAnchorsPreset.

Control.LayoutPresetMode

ValueDescription
KeepHeight = 2

The control's height will not change.

KeepSize = 3

The control's size will not change.

KeepWidth = 1

The control's width will not change.

Minsize = 0

The control will be resized to its minimum size.

Control.MouseBehaviorRecursiveEnum

ValueDescription
Disabled = 1

Prevents the control from receiving mouse input. Control.GetMouseFilterWithOverride will return Control.MouseFilterEnum.Ignore.

Enabled = 2

Allows the control to receive mouse input, depending on the Control.MouseFilter. This can be used to ignore the parent's Control.MouseBehaviorRecursive. Control.GetMouseFilterWithOverride will return the Control.MouseFilter.

Inherited = 0

Inherits the Control.MouseBehaviorRecursive from the parent control. If there is no parent control, this is the same as Control.MouseBehaviorRecursiveEnum.Enabled.

Control.MouseFilterEnum

ValueDescription
Ignore = 2

The control will not receive any mouse movement input events nor mouse button input events through Control.GuiInput. The control will also not receive the Control.MouseEntered nor Control.MouseExited signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has Control.MouseFilterEnum.Pass and an event was passed to this control, the event will further propagate up to the control's parent. Note: If the control has received Control.MouseEntered but not Control.MouseExited, changing the Control.MouseFilter to Control.MouseFilterEnum.Ignore will cause Control.MouseExited to be emitted.

Pass = 1

The control will receive mouse movement input events and mouse button input events if clicked on through Control.GuiInput. The control will also receive the Control.MouseEntered and Control.MouseExited signals. If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-CanvasItem, a control with Control.MouseFilterEnum.Stop, or a CanvasItem with CanvasItem.TopLevel enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to Entity._ShortcutInput for further processing.

Stop = 0

The control will receive mouse movement input events and mouse button input events if clicked on through Control.GuiInput. The control will also receive the Control.MouseEntered and Control.MouseExited signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.

Control.SizeFlags

ValueDescription
Expand = 2

Tells the parent Container to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See Control.SizeFlagsStretchRatio. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical.

ExpandFill = 3

Sets the node's size flags to both fill and expand. See Control.SizeFlags.Fill and Control.SizeFlags.Expand for more information.

Fill = 1

Tells the parent Container to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical.

Maximize = 16

Tells the parent Container to use the node's Control.CustomMaximumSize when doing minimum size calculations. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical. Note: Setting this flag does not necessarily mean the node will be resized to its maximum size, as the parent container may not have enough space to do so. Note: If this node is a child of a Container that enables the Control.SizeFlagsStretchRatio property on its children for layout, nodes with this flag set will be given priority in stretching. If multiple nodes have this flag set, their relative stretch ratios will still be respected.

ShrinkBegin = 0

Tells the parent Container to align the node with its start, either the top or the left edge. It is mutually exclusive with Control.SizeFlags.Fill and other shrink size flags, but can be used with Control.SizeFlags.Expand in some containers. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical. Note: Setting this flag is equal to not having any size flags.

ShrinkCenter = 4

Tells the parent Container to center the node in the available space. It is mutually exclusive with Control.SizeFlags.Fill and other shrink size flags, but can be used with Control.SizeFlags.Expand in some containers. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical.

ShrinkEnd = 8

Tells the parent Container to align the node with its end, either the bottom or the right edge. It is mutually exclusive with Control.SizeFlags.Fill and other shrink size flags, but can be used with Control.SizeFlags.Expand in some containers. Use with Control.SizeFlagsHorizontal and Control.SizeFlagsVertical.

Control.TextDirection

ValueDescription
Auto = 0

Automatic text writing direction, determined from the current locale and text content.

Inherited = 3

Text writing direction is the same as layout direction.

Ltr = 1

Left-to-right text writing direction.

Rtl = 2

Right-to-left text writing direction.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.