Creates a new fixed space UI element.
Optionalscalable: booleanOptionalisInternalConstructor: booleanSets the bounds of the UI element. Relative to a parent UI panel. Equivalent to calling setPosition(), setWidth() and setHeight().
If scalable is set to true, the size will be scaled linearly with the DPI scaling factor of the surface the elements gets
attached. It false, the element will have this exact size no matter the DPI scaling factor.
Returns the clipped bounds of the UI element including the margins. Relative to a parent UI panel.
Returns the clipped bounds of the UI element including the margins. Relative to a parent UI panel.
Returns the clipped bounds of the UI element including the margins. In Screenspace.
Returns the clipped bounds of the UI element including the margins. In Screenspace.
Sets the debug flags for the UI element.
Sets the debug name for the UI element.
Disables or enables the element. Disabled elements cannot be interacted with and have a faded out appearance.
Hides or shows this element and recursively applies the same state to all the child elements. This will not remove the element from the layout, the room for it will still be reserved but it just won't be visible.
Gets the scaling factor for the element's parent surface. This element must be attached to a valid surface in order to retrieve the scale factor. If the element is not attached to a surface, 1.0 is returned.
The scale factor for the element's parent surface.
Sets the element size to be fixed using the specified value.
Sets the element size to be fixed using the specified value in pixels.
Sets the element size to be fixed using the specified value.
Sets the element size to be fixed using the specified value in pixels.
Checks if the underlying native UIElement has been destroyed.
Determines if this element is a fixed on its height.
Determines if this element is a fixed on its width.
Determines if this element is a flexible on its height.
Determines if this element is a flexible on its width.
Specifies that layout passes of children elements should start from this element.
Specifies that overflow content (e.g. shadows from CSS filters) are clipped at this element's bounds.
Specifies that per-frame updates are enabled. If enabled, the element's onUpdate method will be called every frame.
Activates or deactivates this element and recursively applies the same state to all the child elements. This has the same effect as SetDisplayType(UIDisplayType::Hidden), but when disabled it will also remove the element from the layout, essentially having the same effect is if you destroyed the element.
Sets the horizontal alignment of the element when used in a layout.
Sets the vertical alignment of the element when used in a layout.
Sets the minimum height in points of the element when used in a layout.
Sets the minimum width in points of the element when used in a layout.
Returns the layout this element belongs to, if any.
Disables or enables the element. Disabled elements cannot be interacted with and have a faded out appearance.
Returns the screen on which the element is displayed, if any.
Returns non-clipped bounds of the UI element in screenspace.
Returns non-clipped bounds of the UI element in screenspace.
Changes the size of the space to the specified value, in points.
Gets the size hint for this element.
Gets the size hint for this element.
Sets the CSS class names for this element (space-separated).
Sets the element ID for CSS selectors.
Returns non-clipped visible bounds of the UI element (bounds exclude the margins). Relative to the parent UI panel.
Returns non-clipped visible bounds of the UI element (bounds exclude the margins). Relative to the parent UI panel.
Get the window in which the element is positioned.
Adds a CSS class to the element.
The class name to add.
Creates an animation that executes an action lambda once the delay elapsed.
The action to execute.
Optionaldelay: number
The delay until the action is executed. Defaults to no delay.
Optionalrepeating: number | boolean
Whether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
Animates a property of the UIElement. The animation is automatically started.
The type of property to be animated.
The name of the property to be animated on the UIElement.
The starting value of the property.
The ending value of the property.
Optionalduration: number
The animation duration in seconds. Defaults to 1 seconds.
OptionaleasingCurve: Const<EasingCurve>
The easing curve to be used. Defaults to
Optionalrepeating: number | boolean
Whether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
Animates a property of the UIElement using a generic lambda function. The animation is
automatically started.
The lambda that is called when the value is updated. The lambda should be used to assign the value on the u
The starting value of the property.
The ending value of the property.
Optionalduration: number
The animation duration in seconds. Defaults to 1 seconds.
OptionaleasingCurve: Const<EasingCurve>
The easing curve to be used. Defaults to
Optionalrepeating: number | boolean
Whether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
Creates an animation that takes delay seconds to execute.
The delay in seconds.
The created animation.
Converts the originLocalPosition from the originElement to this element.
Converts the originLocalPosition from the originElement to this element.
Updates the layout of the UI element. Updates child elements positions, sizes, clip rectangles and depths so they fit into the provided bounds, while respecting their layout options.
Returns non-clipped bounds of the UI element. Relative to a parent UI panel.
OptionalrelativeTo: UIElementBase
Parent panel of the provided element relative to which to return the bounds. If null the bounds relative to the first parent panel are returned. Behavior is undefined if provided panel is not a parent of the element.
Checks if the element has a specific CSS class.
The class name to check.
True if the class is present.
Virtual
Called when the element has been added to a surface or window.
Virtual
Called when the element has been registered with its parent.
Virtual
Called when the element is about to be unregistered from its parent.
Virtual
Called when the element is updating.
Removes a CSS class from the element.
The class name to remove.
Virtual
Resets element dimensions to their initial values dictated by the element's style.
Sets the bounds of the UI element. Relative to a parent UI panel. Equivalent to calling setPosition(), setWidth() and setHeight().
If scalable is set to true, the size will be scaled linearly with the DPI scaling factor of the surface the elements gets
attached. It false, the element will have this exact size no matter the DPI scaling factor.
Optionalscalable: booleanChanges the size of the space to the specified value, in points. If scalable is true, this value will be scaled by the surface
scaling factor.
Unregisters all running animations for the UIElement.
The number of animations that were unregistered.
Toggles a CSS class on the element.
The class name to toggle.
True if the class is now present, false otherwise.
Scales a point value by using the element's DPI scale to the current pixel value.
The element to scale a value for. This element must be attached to a valid widget in order to retrieve the scale factor. If the element is not attached to a widget, no scaling is performed.
The value in pixels.
Converts a pixel value to points by using the element's DPI scale.
The element to scale a value for. This element must be attached to a valid widget in order to retrieve the scale factor. If the element is not attached to a widget, no scaling is performed.
The value in points.
StaticrenderRenders a UI element into a texture.
The non-null UI element to be drawn to a texture.
The UI skin to use, or null to use the default skin.
The size of the UI texture to draw.
OptionalscalingFactor: number
The DPI scaling factor of the RenderTarget. Can be used to linearly scale the entire UI, including text.
OptionalclearColor: Immutable<SRGBColor>
The clear color. (Default: [0, 0, 0, 0])
An async operation that returns the rendered texture once rendering has been completed by the GPU.
ReadonlyonEvent fired whenever the UI element size changes from a layout update.
ReadonlyonEvent fired whenever the UI element is registered with or unregistered from a parent element.
This does not mean that the element is currently visible on screen or that it is part of a layout. Use onActiveSurfaceChanged to determine if the element is part of a layout that is currently rendered.
ReadonlyonEvent fired whenever the UI element is registered with or unregistered from a surface.
UI element that may be inserted into layouts in order to make a space of a fixed size.