Class UIWatchdogAction

Editor UI element that displays a Watchdog Action.

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Events

Constructors

Properties

_defaultSpacing: number

Default spacing between one element to another.

_iconInitialSpacing: number

The spacing between the icon and the start of the UI Element.

_imageIconSize: number

The image icon size.

_verticalEntrySpacing: number

The vertical spacing inside entry elements.

kSelectionColor: Color

Default selection color of the UI Element.

Accessors

  • get backgroundColor(): Immutable<Color>
  • Sets new background color to be used by the element.

    Returns Immutable<Color>

  • set backgroundColor(value): void
  • Parameters

    Returns void

  • get borderColor(): Immutable<Color>
  • Sets new border color to be used by the element.

    Returns Immutable<Color>

  • set borderColor(value): void
  • Parameters

    Returns void

  • get borderRadiusBottomLeft(): number
  • Sets the border radius of the style used by this element.

    Returns number

  • set borderRadiusBottomLeft(value): void
  • Parameters

    • value: number

    Returns void

  • get borderRadiusBottomRight(): number
  • Sets the border radius of the style used by this element.

    Returns number

  • set borderRadiusBottomRight(value): void
  • Parameters

    • value: number

    Returns void

  • get borderRadiusTopLeft(): number
  • Sets the border radius of the style used by this element.

    Returns number

  • set borderRadiusTopLeft(value): void
  • Parameters

    • value: number

    Returns void

  • get borderRadiusTopRight(): number
  • Sets the border radius of the style used by this element.

    Returns number

  • set borderRadiusTopRight(value): void
  • Parameters

    • value: number

    Returns void

  • get borderWidth(): number
  • Sets new border width to be used by the element.

    Returns number

  • set borderWidth(value): void
  • Parameters

    • value: number

    Returns void

  • get bounds(): Immutable<Rect2>
  • 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.

    Returns Immutable<Rect2>

  • set bounds(value): void
  • Parameters

    Returns void

  • get boundsInPixels(): Immutable<Rect2>
  • Gets or sets non-clipped bounds of the UI element in pixels. Relative to a parent UI panel.

    Returns Immutable<Rect2>

  • set boundsInPixels(value): void
  • Parameters

    Returns void

  • get clippedBoundsInPixels(): Immutable<Rect2>
  • Gets UI element bounds relative to parent widget, clipped by specified clip rect.

    Returns Immutable<Rect2>

  • get clippedVisibleBounds(): Immutable<Rect2>
  • Returns the clipped bounds of the UI element including the margins. Relative to a parent UI panel.

    Returns Immutable<Rect2>

  • get clippedVisibleBoundsInPixels(): Immutable<Rect2>
  • Returns the clipped bounds of the UI element including the margins. Relative to a parent UI panel.

    Returns Immutable<Rect2>

  • get clippedVisibleScreenBounds(): Immutable<Rect2>
  • Returns the clipped bounds of the UI element including the margins. In Screenspace.

    Returns Immutable<Rect2>

  • get clippedVisibleScreenBoundsInPixels(): Immutable<Rect2>
  • Returns the clipped bounds of the UI element including the margins. In Screenspace.

    Returns Immutable<Rect2>

  • get contentPaddingBottom(): number
  • Sets the content padding of the style used by this element.

    Returns number

  • set contentPaddingBottom(value): void
  • Parameters

    • value: number

    Returns void

  • get contentPaddingLeft(): number
  • Sets the content padding of the style used by this element.

    Returns number

  • set contentPaddingLeft(value): void
  • Parameters

    • value: number

    Returns void

  • get contentPaddingRight(): number
  • Sets the content padding of the style used by this element.

    Returns number

  • set contentPaddingRight(value): void
  • Parameters

    • value: number

    Returns void

  • get contentPaddingTop(): number
  • Sets the content padding of the style used by this element.

    Returns number

  • set contentPaddingTop(value): void
  • Parameters

    • value: number

    Returns void

  • get contextMenu(): UIContextMenu
  • 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.

    Returns UIContextMenu

  • set contextMenu(value): void
  • Parameters

    Returns void

  • get debugName(): string
  • Sets the debug name for the UI element.

    Returns string

  • set debugName(value): void
  • Parameters

    • value: string

    Returns void

  • get disabled(): boolean
  • Disables or enables the element. Disabled elements cannot be interacted with and have a faded out appearance.

    Returns boolean

  • set disabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get displayType(): EnumValue<UIDisplayType, number>
  • 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.

    Returns EnumValue<UIDisplayType, number>

  • set displayType(value): void
  • Parameters

    Returns void

  • get dpiScale(): number
  • 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.

    Returns number

    The scale factor for the element's parent surface.

  • get elementDepth(): number
  • Set element part of element depth. Less significant than both widget and area depth.

    Returns number

  • set elementDepth(value): void
  • Parameters

    • value: number

    Returns void

  • get fixedHeight(): number
  • Sets the element size to be fixed using the specified value.

    Returns number

  • set fixedHeight(value): void
  • Parameters

    • value: number

    Returns void

  • set fixedHeightInPixels(value): void
  • Sets the element size to be fixed using the specified value in pixels.

    Parameters

    • value: number

    Returns void

  • get fixedWidth(): number
  • Sets the element size to be fixed using the specified value.

    Returns number

  • set fixedWidth(value): void
  • Parameters

    • value: number

    Returns void

  • set fixedWidthInPixels(value): void
  • Sets the element size to be fixed using the specified value in pixels.

    Parameters

    • value: number

    Returns void

  • get focusProxy(): UIElement
  • Gets the focus proxy element.

    Returns UIElement

  • set focusProxy(value): void
  • Parameters

    Returns void

  • get isAcceptingKeyFocus(): boolean
  • Determines if the element can be navigated to by using keys/buttons (e.g. the 'Tab' button on the keyboard.

    Returns boolean

  • set isAcceptingKeyFocus(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isActive(): boolean
  • Determines if the element is currently being "clicked" by a pointer device or keyboard input.

    Returns boolean

  • set isActive(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isDestroyed(): boolean
  • Checks if the underlying native UIElement has been destroyed.

    Returns boolean

  • get isEventPassThrough(): boolean
  • 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.

    Returns boolean

  • set isEventPassThrough(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isFocused(): boolean
  • Determines if the element is currently being focused, typically in a state to accept for keyboard input.

    Returns boolean

  • set isFocused(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isHovered(): boolean
  • Determines if the element is currently hovered by a pointer device.

    Returns boolean

  • set isHovered(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isHoverEventPassThrough(): boolean
  • Determines if the element is receives hover events.

    Returns boolean

  • set isHoverEventPassThrough(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isIgnoreFocus(): boolean
  • Determines if the element can be focused by clicking on it.

    Returns boolean

  • set isIgnoreFocus(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isInteractiveFill(): boolean
  • Determines if the element fill is interactive based on mouse events. This requires mouse-move events to be enabled.

    Returns boolean

  • set isInteractiveFill(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isInteractiveStroke(): boolean
  • Determines if the element stroke is interactive based on mouse events. This requires mouse-move events to be enabled.

    Returns boolean

  • set isInteractiveStroke(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isLayoutBarrier(): boolean
  • Specifies that layout passes of children elements should start from this element.

    Returns boolean

  • set isLayoutBarrier(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isOn(): boolean
  • Determines if the element is currently being "clicked" by a pointer device or keyboard input.

    Returns boolean

  • set isOn(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isReceivingHoverEvents(): boolean
  • Determines if the element is receives hover events.

    Returns boolean

  • set isReceivingHoverEvents(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isReceivingMouseMoveEvents(): boolean
  • Determines if the element is receives hover events.

    Returns boolean

  • set isReceivingMouseMoveEvents(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isUpdating(): boolean
  • Specifies that per-frame updates are enabled. If enabled, the element's onUpdate method will be called every frame.

    Returns boolean

    Per-frame updates are expensive and most UI elements should be built using a fully event-driven approach. Do not enable per-frame updates unless there is no event available that can be used to drive the required behavior.

  • set isUpdating(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isVisible(): boolean
  • 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.

    Returns boolean

  • set isVisible(value): void
  • Parameters

    • value: boolean

    Returns void

  • get minimumHeight(): number
  • Sets the minimum height in points of the element when used in a layout.

    Returns number

  • set minimumHeight(value): void
  • Parameters

    • value: number

    Returns void

  • get minimumWidth(): number
  • Sets the minimum width in points of the element when used in a layout.

    Returns number

  • set minimumWidth(value): void
  • Parameters

    • value: number

    Returns void

  • 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().

    Returns UINavGroup

  • Parameters

    Returns void

  • get paddingBottom(): number
  • Sets the padding of the style used by this element.

    Returns number

  • set paddingBottom(value): void
  • Parameters

    • value: number

    Returns void

  • get paddingLeft(): number
  • Sets the padding of the style used by this element.

    Returns number

  • set paddingLeft(value): void
  • Parameters

    • value: number

    Returns void

  • get paddingRight(): number
  • Sets the padding of the style used by this element.

    Returns number

  • set paddingRight(value): void
  • Parameters

    • value: number

    Returns void

  • get paddingTop(): number
  • Sets the padding of the style used by this element.

    Returns number

  • set paddingTop(value): void
  • Parameters

    • value: number

    Returns void

  • get parent(): UIElementBase
  • Returns the layout this element belongs to, if any.

    Returns UIElementBase

  • get position(): Immutable<Vector2>
  • Sets element position relative to parent UI panel in points.

    Returns Immutable<Vector2>

    Be aware that this value will be ignored if UI element is part of a layout since then the layout controls its placement.

  • set position(value): void
  • Parameters

    Returns void

  • set positionInteger(value): void
  • Sets element position relative to parent UI panel in pixels.

    Parameters

    Returns void

    Be aware that this value will be ignored if UI element is part of a layout since then the layout controls its placement.

  • get readOnly(): boolean
  • Disables or enables the element. Disabled elements cannot be interacted with and have a faded out appearance.

    Returns boolean

  • set readOnly(value): void
  • Parameters

    • value: boolean

    Returns void

  • get screen(): Screen
  • Returns the screen on which the element is displayed, if any.

    Returns Screen

  • get screenBounds(): Immutable<Rect2>
  • Returns non-clipped bounds of the UI element in screenspace.

    Returns Immutable<Rect2>

    This call can be potentially expensive if the UI state is dirty.

  • get screenBoundsInPixels(): Immutable<Rect2>
  • Returns non-clipped bounds of the UI element in screenspace.

    Returns Immutable<Rect2>

    This call can be potentially expensive if the UI state is dirty.

  • get sizeHint(): Immutable<Size2>
  • Gets the size hint for this element.

    Returns Immutable<Size2>

    The size hint represents an approximation of the size. The actual size depends on the layouting that is done by the parent element. Layouts typically use the size hint to calculate the intial size of the element when distributing the available layout space.

  • get sizeHintInPixels(): Immutable<Vector2>
  • Gets the size hint for this element.

    Returns Immutable<Vector2>

    The size hint represents an approximation of the size. The actual size depends on the layouting that is done by the parent element. Layouts typically use the size hint to calculate the intial size of the element when distributing the available layout space.

  • get style(): string
  • Sets new style to be used by the element.

    Returns string

  • set style(value): void
  • Parameters

    • value: string

    Returns void

  • get visibleBounds(): Immutable<Rect2>
  • Returns non-clipped visible bounds of the UI element (bounds exclude the margins). Relative to the parent UI panel.

    Returns Immutable<Rect2>

    This call can be potentially expensive as the bounds need to be calculated based on current UI state.

  • get visibleBoundsInPixels(): Immutable<Rect2>
  • Returns non-clipped visible bounds of the UI element (bounds exclude the margins). Relative to the parent UI panel.

    Returns Immutable<Rect2>

    This call can be potentially expensive as the bounds need to be calculated based on current UI state.

  • get window(): RenderWindow
  • Get the window in which the element is positioned.

    Returns RenderWindow

Methods

  • Creates an animation that executes an action lambda once the delay elapsed.

    Parameters

    • action: (() => void)

      The action to execute.

        • (): void
        • Returns void

    • 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.

    Returns EditorAnimation

    The created animation.

  • Animates a property of the UIElement. The animation is automatically started.

    Type Parameters

    • T

      The type of property to be animated.

    Parameters

    • propertyName: string

      The name of the property to be animated on the UIElement.

    • starting: T

      The starting value of the property.

    • ending: T

      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.

    Returns EditorAnimation

    The created animation.

    EasingCurve.inOutQuadratic.

  • Animates a property of the UIElement using a generic lambda function. The animation is automatically started.

    Type Parameters

    • T

    Parameters

    • setter: ((value: T) => void)

      The lambda that is called when the value is updated. The lambda should be used to assign the value on the u

        • (value): void
        • Parameters

          • value: T

          Returns void

    • starting: T

      The starting value of the property.

    • ending: T

      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.

    Returns EditorAnimation

    The created animation.

    EasingCurve.inOutQuadratic.

  • Creates an animation that takes delay seconds to execute.

    Parameters

    • delay: number

      The delay in seconds.

    Returns EditorAnimation

    The created animation.

    This animation is usedful when creating compound animations that are chained together by calls to then. This is helpful to create an animation that performs an action, waits and performs another action.

  • Fetch and cache necessary data for the current Watchdog Action.

    Returns void

  • 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.

    Parameters

    Returns boolean

  • Virtual

    Destroys this element and all its children. Removes the element from parent layout/panel.

    Returns void

    Calling methods on a destroyed element is a no-operation. Destroyed elements aren't allowed to be assigned as children of other elements, or be parents of other elements.

  • 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 void

    This may trigger the layout of more than this element and it's children! It can potentially update the layout of the whole UI tree.

  • 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.

    Returns boolean

    whether the element is already blocking events or not.

  • Returns non-clipped bounds of the UI element. Relative to a parent UI panel.

    Parameters

    • 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.

    Returns Rect2

    This call can be potentially expensive if the UI state is dirty.

  • Virtual

    Checks is the specified position within UI element bounds. Position is relative to parent UI widget.

    Parameters

    Returns boolean

  • 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.

    Parameters

    Returns boolean

  • Virtual

    Called when the element has been added to a surface or window.

    Returns void

    This event allows to immediately access the layout data and bounds of the element and it's immediate parents and children. The event is helpful to perform initialization and registration to events. Implementing classes must call super.

  • Virtual

    Called when the element has been removed from a surface or window.

    Returns void

    Layout data and bounds will no longer be available at this point. The event is helpful to perform cleanup and unregistration from events. Implementing classes must call super.

  • Virtual

    Called when the element has been registered with its parent.

    Returns void

  • Virtual

    Invoked when the UI requests the UIElement to create a custom tooltip.

    Returns UIElementBase

    A UIElement that contains the tooltip content.

    An element must be returned that is not yet added to a UI hierarchy. If the element is already added to a hierachy, it will be removed and disposed once the tooltip finished. However, it is acceptable to preallocate a UIElement and always return the same UIElement.

  • Virtual

    Called when the element is about to be unregistered from its parent.

    Returns void

  • Virtual

    Called when the element is updating.

    Returns void

    This is method is only called if the element has been marked as requiring updates.

    Per-frame updates are expensive and most UI elements should be built using a fully event-driven approach. Do not enable per-frame updates unless there is no event available that can be used to drive the required behavior.

  • Recreates the context menu for this entry.

    Returns void

  • Virtual

    Resets element dimensions to their initial values dictated by the element's style.

    Returns void

  • 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.

    Parameters

    • isBlocking: boolean

      Should the element block events

    Returns boolean

    whether the element is already blocking events or not.

  • Sets the border radius of the style used by this element.

    Parameters

    • value: number

    Returns void

  • 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.

    Parameters

    Returns void

  • Sets the content padding of the style used by this element.

    Parameters

    • value: number

    Returns void

  • Assigns a custom cursor type.

    Parameters

    • options: {
          type: EnumValue<CursorType, number>;
      } | {
          name: string;
      }

      Options object for the function call.

    Returns void

  • Sets element height in pixels. Element will be resized according to its contents and parent layout but will always stay within the provided range. If maximum height is zero, the element is allowed to expand as much as it needs.

    If scalable is set to true, the minimum and maximum heights 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.

    Parameters

    • OptionalminHeight: number
    • OptionalmaxHeight: number
    • Optionalscalable: boolean

    Returns void

  • Sets element width in pixels. Element will be resized according to its contents and parent layout but will always stay within the provided range. If maximum width is zero, the element is allowed to expand as much as it needs.

    If scalable is set to true, the minimum and maximum widths 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.

    Parameters

    • OptionalminWidth: number
    • OptionalmaxWidth: number
    • Optionalscalable: boolean

    Returns void

  • Change the UI element focus state, will clear focus of any currently focussed element.

    Parameters

    • isEnabled: boolean

      Give the element focus or take it away.

    Returns void

  • Sets the padding of the style used by this element.

    Parameters

    • value: number

    Returns void

  • 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.

    Parameters

    Returns boolean

  • Unregisters all running animations for the UIElement.

    Returns number

    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.

    Parameters

    Returns boolean

  • Scales a point value by using the element's DPI scale to the current pixel value.

    Parameters

    • valueInPoints: number

      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.

    Returns number

    The value in pixels.

  • Scales a point value by using the element's DPI scale to the current pixel value.

    Parameters

    • valueInPoints: Immutable<Vector2>

      The element used to get the DPI scaling factor.

    Returns Vector2

    Result value in pixels.

  • Converts a pixel value to points by using the element's DPI scale.

    Parameters

    • valueInPixels: number

      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.

    Returns number

    The value in points.

  • Scales a point value by using the element's DPI scale to the current point value.

    Parameters

    • valueInPixels: Immutable<Vector2>

      The element used to get the DPI scaling factor.

    Returns Vector2

    Result value in points.

  • Updates the contents of the current UI element with the given Watchdog Action.

    Parameters

    Returns void

  • 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.

    Parameters

    Returns boolean

  • Virtual

    Executes the given action with blocked events on the UI element. The events are restored before returning.

    Parameters

    • action: (() => void)

      The action to be executed while events are blocked.

        • (): void
        • Returns void

    Returns void

  • Gets a user friendly string for the given Watchdog Action type.

    Parameters

    • action: WatchdogAction

      The watchdog action to get.

    • isStreamingData: boolean

    Returns {
        __brand: "EditorI18N";
        compare(other: string, mode: EnumValue<StringCompareMode, number>): boolean;
        trimString(value: string): string;
        trimStringEnd(value: string): string;
        trimStringStart(value: string): string;
    }

    • __brand: "EditorI18N"
    • compare:function
      • Compares two strings for equality by respecting the given comparison mode.

        Parameters

        • other: string

          The string to compare to.

        • mode: EnumValue<StringCompareMode, number>

          The mode to compare the string. Allows specifying how case sensitivity should be treated on the compare.

        Returns boolean

        True if the strings are considered equal for the given mode; false otherwise.

    • trimString:function
      • Trims the characters from the start and the end and returns the result as a new string.

        Parameters

        • value: string

        Returns string

    • trimStringEnd:function
      • Trims the characters from the end and returns the result as a new string.

        Parameters

        • value: string

        Returns string

    • trimStringStart:function
      • Trims the characters from the start and returns the result as a new string.

        Parameters

        • value: string

        Returns string

  • Renders a UI element into a texture.

    Parameters

    • element: UIElementBase

      The UI element to be drawn to a texture.

    • skin: UISkin | ResourceHandle<UISkin>

      The UI skin to be used to render the element.

    • sizeInPixels: Immutable<Size2>

      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])

    Returns AsyncOp<ResourceHandle<Texture>, void>

    An async operation that returns the rendered texture once rendering has been completed by the GPU.

    Calling this method will detach the given element from it's current parent.

Events

onFocusGained: Event<[], void>

Triggered when the element gains focus.

onFocusLost: Event<[], void>

Triggered when the element loses focus.

onMouseEnter: Event<[], void>

Triggered when the mouse enters over the UI element.

onMouseLeave: Event<[], void>

Triggered when the mouse leaves the UI element.

onClickUp: Event<[], void>

Triggered when the element was clicked.

onCustomContextMenuRequested: Event<[], UIContextMenu>

Triggered when the widget requests the creation of a context menu.

onStateChanged: Event<[EnumValue<UIElementState, number>, EnumValue<UIElementState, number>], void>

Triggered when the element state changes.

onLayoutSizeChanged: Event<[Immutable<Size2>, Immutable<Size2>], void>

Event fired whenever the UI element size changes from a layout update.

The old size of the UI element, in points.

The new size of the UI element, in points.

onRegistrationChanged: Event<[boolean], void>

Event 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.

True if the new state is registered in a parent element.

onActiveSurfaceChanged: Event<[boolean], void>

Event fired whenever the UI element is registered with or unregistered from a surface.

True if the new state is registered in a surface.