Creates a new UIReactionControl with the given style.
OptionalstyleName: stringOptionalisInternalConstructor: booleanDetermines the currently active reaction. Active reactions are highlighted to indicate that this is the reaction that was picked by the user.
Sets the border radius of the style used by this element.
Sets the border radius of the style used by this element.
Sets the border radius of the style used by this element.
Sets the border radius of the style used by this element.
Sets new border width to be used by the element.
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.
Gets UI element bounds relative to parent surface, clipped by specified clip rect.
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 content border radius mode.
Sets the content padding of the style used by this element.
Sets the content padding of the style used by this element.
Sets the content padding of the style used by this element.
Sets the content padding of the style used by this element.
Assigns a new context menu that will be opened when the element is right clicked. Null is allowed in case no context menu is wanted.
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.
Set element part of element depth. Less significant than both surface and area depth.
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 is the input field currently active.
Determines if the element can be navigated to by using keys/buttons (e.g. the 'Tab' button on the keyboard.
Determines if the element is currently being "clicked" by a pointer device or keyboard input.
If true, the control will defocus when the user confirms the interaction with the control.
Checks if the underlying native UIElement has been destroyed.
Determines if the element is a drag and drop target which will receive drag and drop events.
Determines if reactions with a count of 0 are hidden from the UI.
Determines will this element block elements underneath it from receiving events like pointer click, hover on/off or be able to gain focus. True by default.
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.
Determines if the element is currently being focused, typically in a state to accept for keyboard input.
Determines if the element is currently fully clipped (either the clipped bounds width or height are 0).
Determines if the element is currently hovered by a pointer device.
Determines if the element is receives hover events.
Determines if the element can be focused by clicking on it.
Determines if the element fill is interactive based on mouse events. This requires mouse-move events to be enabled.
Determines if the element stroke is interactive based on mouse events. This requires mouse-move events to be enabled.
Specifies that layout passes of children elements should start from this element.
Determines if the element is currently being "clicked" by a pointer device or keyboard input.
Specifies that overflow content (e.g. shadows from CSS filters) are clipped at this element's bounds.
Determines if the element is receives hover events.
Determines if the element is receives hover events.
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.
ProtectedlayoutThe control layout
Sets the horizontal alignment of the element when used in a layout.
Sets the vertical alignment of the element when used in a layout.
Gets the main element.
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.
Sets a navigation group that determines in what order are UI elements visited when using a keyboard or gamepad to switch between the elements. If you don't set a navigation group the elements will inherit the default navigation group from their parent UISurface. Also see SetNavigationGroupIndex().
Sets the padding of the style used by this element.
Sets the padding of the style used by this element.
Sets the padding of the style used by this element.
Sets the padding of the style used by this element.
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.
Gets the size hint for this element.
Gets the size hint for this element.
Sets new style to be used by the 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.
Clears a previously assigend cursor.
Virtual
Called when a command event is triggered. Return true if you have processed the event and don't want other elements to process it.
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.
If isBlocking is true, events emitted by this object are blocked. If isBlocking is false, no blocking will occur and events
will be triggered normally.
Events emitted while being blocked are not buffered.
whether the element is already blocking events or not.
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.
Gets the MainElement as class of T.
The requested class
Determines the number of reactions for the given reaction kind.
The reaction kind to set the count for.
Gets the currently active element style.
Checks if the element has a specific CSS class.
The class name to check.
True if the class is present.
Virtual
Called when a mouse event is received on any UI element the mouse is interacting with. Return true if you have processed the event and don't want other elements to process it.
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
Invoked when the UI requests the UIElement to create a custom tooltip.
A UIElement that contains the tooltip content.
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.
If isBlocking is true, events emitted by this object are blocked. If isBlocking is false, no blocking will occur and events
will be triggered normally.
Events emitted while being blocked are not buffered.
Should the element block events
whether the element is already blocking events or not.
Sets the border radius of the style used by this element.
Optionalvalue: numberSets 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: booleanSets the content padding of the style used by this element.
Optionalvalue: numberChange the UI element focus state, will clear focus of any currently focussed element.
Give the element focus or take it away.
Sets the padding of the style used by this element.
Optionalvalue: numberDetermines the number of reactions for the given reaction kind.
The reaction kind to set the count for.
The number of reactions to display.
Virtual
Called when a shortcut action is triggered and the UI element has input focus. Return true if you have processed the event and don't want other elements to process it.
Unregisters all running animations for the UIElement.
The number of animations that were unregistered.
Virtual
Called when some text is input and the UI element has input focus. Return true if you have processed the event and don't want other elements to process it.
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.
A helper method used to trigger UI events. This method does some special checking if events are blocked for the current UI element and, if blocked, will not trigger the event.
Virtual
Called when a virtual button is pressed/released and the UI element has input focus. Return true if you have processed the event and don't want other elements to process it.
Virtual
Executes the given action with blocked events on the UI element. The events are restored
before returning.
The action to be executed while events are blocked.
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.
ReadonlyonA event triggered whenever the user clicks on a reaction button.
ReadonlyonTriggered when the user starts an interaction with the control.
ReadonlyonTriggered when the user ends it's interaction with the control but hasn't confirmed the input yet.
ReadonlyonTriggered when the user confirms the interaction with the control. For example, by pressing Enter.
ReadonlyonTriggered when the user cancels it's input. For example, by pressing Esc.
ReadonlyonTriggered when the element gains focus.
ReadonlyonTriggered when the element loses focus.
ReadonlyonTriggered when the mouse enters over the UI element.
ReadonlyonTriggered when the mouse leaves the UI element.
ReadonlyonTriggered when the element was clicked.
ReadonlyonTriggered when the element requests the creation of a context menu.
ReadonlyonTriggered when the element state changes.
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.
A control that displays a set of buttons that allow the user to pick a reaction for the message.