Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:UIScreenObject native functions (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject (native functions)

Contents

UIScreenObject native functions in other games:
UDK

Native functions[edit]

AcceptsPlayerInput[edit]

native final function bool AcceptsPlayerInput (int PlayerIndex) const

Determines whether this widget can accept input from the player specified

Parameters:

  • PlayerIndex - the index of the player to check

Returns:

TRUE if this widget's PlayerInputMask allows it to process input from the specified player.

ActivateEventByClass[edit]

native final noexport function ActivateEventByClass (int PlayerIndex, class<UIEventEventClassToActivate, optional Object InEventActivator, optional bool bActivateImmediately, optional array<intIndicesToActivate, optional out array<UIEventout_ActivatedEvents)

Activate the event of the specified class.

Parameters:

  • PlayerIndex - the index of the player that activated this event
  • EventClassToActivate - specifies the event class that should be activated. If there is more than one instance of a particular event class in this screen object's list of events, all instances will be activated in the order in which they occur in the event provider's list.
  • InEventActivator - an optional object that can be used for various purposes in UIEvents
  • bActivateImmediately - TRUE to activate the event immediately, causing its output operations to also be processed immediately.
  • IndicesToActivate - Indexes into this UIEvent's Output array to activate. If not specified, all output links will be activated
  • out_ActivatedEvents - filled with the event instances that were activated.

Note: noexport because non-const optional arrays aren't exported correctly by the script compiler.

ActivateState[edit]

native final virtual function bool ActivateState (UIState StateToActivate, int PlayerIndex)

Adds the specified state to the screen object's StateStack.

Parameters:

  • StateToActivate - the new state for the widget
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

Returns:

TRUE if the widget's state was successfully changed to the new state. FALSE if the widget couldn't change to the new state or the specified state already exists in the widget's list of active states

ActivateStateByClass[edit]

native final noexport function bool ActivateStateByClass (class<UIStateStateToActivate, int PlayerIndex, optional out UIState StateThatWasAdded)

Alternate version of ActivateState that activates the first state in the InactiveStates array with the specified class that isn't already in the StateStack

CanAcceptFocus[edit]

native function bool CanAcceptFocus (optional int PlayerIndex) const

Determines whether this widget can become the focused control.

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player to check focus availability

Returns:

TRUE if this widget (or any of its children) is capable of becoming the focused control.

CanPropagateFocusFor[edit]

native final function bool CanPropagateFocusFor (UIObject TestChild) const

Determines whether this widget is allowed to propagate focus chains to and from the specified widget.

Parameters:

  • TestChild - the widget to check

Returns:

TRUE if the this widget is allowed to route the focus chain through TestChild.

CanvasToScreen[edit]

native final function Object.Vector4 CanvasToScreen (const out Object.Vector CanvasPosition) const

Transforms a vector from canvas (widget local) space into screen (D3D device) space

Parameters:

  • CanvasPosition - a vector representing a location in widget local space.

Returns:

a vector representing that location in screen space.

ConditionalPropagateEnabledState[edit]

native final virtual function bool ConditionalPropagateEnabledState (int PlayerIndex, optional bool bForce)

Propagates the enabled state of this widget to its child widgets, if the widget has the PRIVATE_PropageteState flag set.

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call
  • bForce - specify TRUE to propagate the enabled state even if this widget doesn't have the PropagateState flag set.

Returns:

TRUE if child widget states were set successfully.

ContainsChild[edit]

native final function bool ContainsChild (UIObject Child, optional bool bRecurse) const

Returns whether this screen object contains the specified child in its list of children.

Parameters:

  • Child - the child to look for
  • bRecurse - whether to search child widgets for the specified child. if this value is FALSE, only the Children array of this screen object will be searched for Child.

Returns:

TRUE if Child is contained by this screen object

ContainsChildOfClass[edit]

native final function bool ContainsChildOfClass (class<UIObjectSearchClass, optional bool bRecurse) const

Returns whether this screen object contains a child of the specified class.

Parameters:

  • SearchClass - the class to search for.
  • bRecurse - indicates whether to search child widgets. if this value is FALSE, only the Children array of this screen object will be searched for instances of SearchClass.

Returns:

TRUE if Child is contained by this screen object

CreatePlayerData[edit]

native final virtual function CreatePlayerData (int PlayerIndex, LocalPlayer AddedPlayer)

Called when a new player has been added to the list of active players (i.e. split-screen join) after the scene has been activated.

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was inserted
  • AddedPlayer - the player that was added

CreateWidget[edit]

native final function UIObject CreateWidget (UIScreenObject Owner, class<UIObjectWidgetClass, optional Object WidgetArchetype, optional name WidgetName)

Utility function for encapsulating constructing a widget

Parameters:

  • Owner - the container for the widget. Cannot be none
  • WidgetClass - the class of the widget to create. Cannot be none.
  • WidgetArchetype - the template to use for creating the widget
  • WidgetName - the name to use for the new widget

DeactivateState[edit]

native final virtual function bool DeactivateState (UIState StateToRemove, int PlayerIndex)

Removes the specified state from the screen object's state stack.

Parameters:

  • StateToRemove - the state to be removed
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

Returns:

TRUE if the state was successfully removed, or if the state didn't exist in the widget's list of states; false if the state overrode the request to be removed

DeactivateStateByClass[edit]

native final noexport function bool DeactivateStateByClass (class<UIStateStateToRemove, int PlayerIndex, optional out UIState StateThatWasRemoved)

Alternate version of DeactivateState that deactivates the last state in the StateStack array that has the specified class.

DeProject[edit]

native final function Object.Vector DeProject (const out Object.Vector PixelPosition) const

Converts an absolute pixel position into 3D screen coordinates.

Parameters:

  • PixelPosition - the position of the 2D point, in pixels

Returns:

a position tranformed using this widget's rotation and the scene client's projection matrix.

FindChild[edit]

native final function UIObject FindChild (name WidgetName, optional bool bRecurse) const

Find a child widget with the specified name

Parameters:

  • WidgetName - the name of the child to find
  • bRecurse - if TRUE, searches all children of this object recursively

Returns:

a pointer to a widget contained by this object that has the specified name, or NULL if no widgets with that name were found

FindChildIndex[edit]

native final function int FindChildIndex (name WidgetName) const

Find the index for the child widget with the specified name

Parameters:

  • WidgetName - the name of the child to find

Returns:

the index into the array of children for the widget that has the specified name, or -1 if there aren't any widgets with that name.

FindChildUsingID[edit]

native final function UIObject FindChildUsingID (UIRoot.WIDGET_ID WidgetID, optional bool bRecurse) const

Find a child widget with the specified GUID

Parameters:

  • WidgetID - the ID(GUID) of the child to find
  • bRecurse - if TRUE, searches all children of this object recursively

Returns:

a pointer to a widget contained by this object that has the specified GUID, or NULL if no widgets with that name were found

FindEventsOfClass[edit]

native final function FindEventsOfClass (class<UIEventEventClassToFind, out array<UIEventout_EventInstances, optional UIState LimitScope, optional bool bExactClass)

Finds UIEvent instances of the specified class.

Parameters:

  • EventClassToFind - specifies the event class to search for.
  • out_EventInstances - an array that will contain the list of event instances of the specified class.
  • LimitScope - if specified, only events contained by the specified state's sequence will be returned.
  • bExactClass - if TRUE, only events that have the class specified will be found. Otherwise, events of that class or any of its child classes will be found.

FocusFirstControl[edit]

native function bool FocusFirstControl (UIScreenObject Sender, optional int PlayerIndex)

Sets focus to the first focus target within this container.

Parameters:

  • Sender - the widget that generated the focus change. if NULL, this widget generated the focus change.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

TRUE if focus was successfully propagated to the first focus target within this container.

FocusLastControl[edit]

native function bool FocusLastControl (UIScreenObject Sender, optional int PlayerIndex)

Sets focus to the last focus target within this container.

Parameters:

  • Sender - the widget that generated the focus change. if NULL, this widget generated the focus change.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

TRUE if focus was successfully propagated to the last focus target within this container.

GetAspectRatioAutoScaleFactor[edit]

native final function float GetAspectRatioAutoScaleFactor (optional Font BaseFont) const

Calculate the correct scaling factor to use for preserving aspect ratios in e.g. string and image formatting.

Parameters:

  • BaseFont - if specified, a font which can provide a "base" resolution for the scale; otherwise, uses the values of the DFEAULT_SIZE_X/Y consts as the base resolution.
  • a - float representing the aspect ratio percentage to use for scaling fonts and images.

GetBestPlayerIndex[edit]

native final function int GetBestPlayerIndex () const

Returns the index [into the Engine.GamePlayers array] for the player that this widget's owner scene last received input from, or INDEX_NONE if the scene is NULL or hasn't received any input from players yet.

GetBounds[edit]

native final function float GetBounds (UIRoot.EUIOrientation Dimension, UIRoot.EPositionEvalType OutputType, optional bool bIgnoreDockPadding) const

Returns the width or height for this widget

Parameters:

  • Dimension - UIORIENT_Horizontal to get the width, UIORIENT_Vertical to get the height
  • OutputType - indicates the format of the returnedvalue
  • bIgnoreDockPadding - used to prevent recursion when evaluting docking links

GetCanvasToScreen[edit]

native final function Object.Matrix GetCanvasToScreen () const

Returns a matrix which includes the scene client's CanvasToScreen matrix and this widget's tranform matrix.

GetChildren[edit]

native final noexport function array<UIObjectGetChildren (optional bool bRecurse, optional array<UIObjectExclusionSet) const

Gets a list of all children contained in this screen object.

Parameters:

  • bRecurse - if FALSE, result will only contain widgets from this screen object's Children array if TRUE, result will contain all children of this screen object, including their children.
  • ExclusionSet - if specified, any widgets contained in this array will not be added to the output array.

Returns:

an array of widgets contained by this screen object.

Note: noexport because non-const optional arrays aren't exported correctly by the script compiler.

GetCurrentState[edit]

native final function UIState GetCurrentState (int PlayerIndex)

Gets the current UIState of this screen object

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

GetDockedWidgets[edit]

native final function GetDockedWidgets (out array<UIObjectout_DockedWidgets, optional UIRoot.EUIWidgetFace SourceFace, optional UIRoot.EUIWidgetFace TargetFace) const

Generates a list of all widgets which are docked to this one.

Parameters:

  • out_DockedWidgets - receives the list of widgets which are docked to this one
  • SourceFace - if specified, only widgets which are docked to this one through the specified face will be considered
  • TargetFace - if specified, only widgets which are docked to the specified face on this widget will be considered

GetFocusedControl[edit]

native final function UIObject GetFocusedControl (optional bool bRecurse, optional int PlayerIndex) const

Retrieves the child of this widget which is current focused.

Parameters:

  • bRecurse - if TRUE, returns the inner-most focused widget; i.e. the widget at the end of the focus chain
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

a pointer to the child (either direct or indirect) widget which is in the focused state and is the focused control for its parent widget, or NULL if this widget doesn't have a focused control.

GetInverseCanvasToScreen[edit]

native final function Object.Matrix GetInverseCanvasToScreen () const

Returns the inverse of the canvas to screen matrix.

GetLastFocusedControl[edit]

native final function UIObject GetLastFocusedControl (optional bool bRecurse, optional int PlayerIndex) const

Retrieves the child of this widget which last had focus.

Parameters:

  • bRecurse - if TRUE, returns the inner-most previously focused widget; i.e. the widget at the end of the focus chain
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

a pointer to the child (either direct or indirect) widget which was previously the focused control for its parent, or NULL if this widget doesn't have a LastFocusedControl

GetObjectCount[edit]

native final function int GetObjectCount () const

Returns the number of UIObjects owned by this UIScreenObject, recursively

Returns:

the number of widgets (including this one) contained by this widget, including all child widgets

GetPlayerOwner[edit]

native final function LocalPlayer GetPlayerOwner (optional int PlayerIndex)

Retrieves a reference to a LocalPlayer.

Parameters:

  • PlayerIndex - if specified, returns the player at this index in the GamePlayers array. Otherwise, returns the player associated with the owner scene.

Returns:

the player that owns this scene or is located in the specified index of the GamePlayers array.

GetPosition[edit]

native final function float GetPosition (UIRoot.EUIWidgetFace Face, UIRoot.EPositionEvalType OutputType, optional bool bZeroOrigin, optional bool bIgnoreDockPadding) const

Parameters:

  • Face - indicates which face to change the position for
  • OutputType - indicates the format of the returnedvalue EVALPOS_None: NewValue will be considered to be in whichever format is configured as the ScaleType for the specified face EVALPOS_PercentageOwner: EVALPOS_PercentageScene: EVALPOS_PercentageViewport: Indicates that return value is between 0.0 and 1.0, which represents the percentage of the corresponding base's actual size. EVALPOS_PixelOwner EVALPOS_PixelScene EVALPOS_PixelViewport Indicates that return value is an actual pixel value, relative to the corresponding base.
  • bIgnoreDockPadding - used to prevent recursion when evaluting docking links

Returns:

the Position of a given face for this widget

GetPositionVector[edit]

native final function Object.Vector GetPositionVector (optional bool bIncludeParentPosition) const

Returns this widget's absolute normalized screen position as a vector.

Parameters:

  • bIncludeParentPosition - if TRUE, coordinates returned will be absolute (relative to the viewport origin); if FALSE returned coordinates will be relative to the owning widget's upper left corner, if applicable.

GetSupportedPlayerCount[edit]

native final function int GetSupportedPlayerCount ()

Returns the maximum number of players that could potentially generate input for this scene. If the owning scene's input mode is INPUTMODE_Free, will correspond to the maximum number of simultaneous gamepads supported by this platform; otherwise, the number of active players.

GetViewportHeight[edit]

native final function float GetViewportHeight () const

Retrieves the height of the viewport this widget uses for rendering.

GetViewportOffset[edit]

native final function bool GetViewportOffset (out Object.Vector2D out_ViewportOffset) const

Retrieves the virtual viewport offset for the viewport which renders this widget's scene. Only relevant in the UI editor; non-zero if the user has panned or zoomed the viewport.

Parameters:

  • out_ViewportOffset - out] will be filled in with the delta between the viewport's actual origin and virtual origin.

Returns:

TRUE if the viewport origin was successfully retrieved

GetViewportOrigin[edit]

native final function bool GetViewportOrigin (out Object.Vector2D out_ViewportOrigin) const

Retrieves the virtual origin of the viewport that this widget is rendered within. See additional comments in UISceneClient

In the game, this will be non-zero if Scene is for split-screen and isn't for the first player. In the editor, this will be equal to the value of the gutter region around the viewport.

Parameters:

  • out_ViewportOrigin - out] will be filled in with the origin point for the viewport that owns this screen object

Returns:

TRUE if the viewport origin was successfully retrieved

GetViewportScale[edit]

native final function float GetViewportScale () const

Retrieves the scale factor for the viewport which renders this widget's scene. Only relevant in the UI editor.

GetViewportSize[edit]

native final function bool GetViewportSize (out Object.Vector2D out_ViewportSize) const

Retrieves the viewport size, accounting for split-screen.

Parameters:

  • out_ViewportSize - out] will be filled in with the width & height of the viewport that owns this screen object

Returns:

TRUE if the viewport size was successfully retrieved

GetViewportWidth[edit]

native final function float GetViewportWidth () const

Retrieves the width of the viewport this widget uses for rendering.

GetWidgetPathName[edit]

native final noexport function string GetWidgetPathName ()

Returns a string representation of this widget's hierarchy. i.e. SomeScene.SomeContainer.SomeWidget

HasActiveStateOfClass[edit]

native final noexport function bool HasActiveStateOfClass (class<UIStateStateClass, int PlayerIndex, optional out int StateIndex)

Determine whether there are any active states of the specified class

Parameters:

  • StateClass - the class to search for
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call
  • StateIndex - if specified, will be set to the index of the last state in the list of active states that has the class specified

Returns:

TRUE if there is at least one active state of the class specified

Initialize[edit]

native final function virtual Initialize (UIScene inOwnerScene, optional UIObject inOwner)

Perform all initialization for this widget. Called on all widgets when a scene is opened, once the scene has been completely initialized. For widgets added at runtime, called after the widget has been inserted into its parent's list of children.

Parameters:

  • inOwnerScene - the scene to add this widget to.
  • inOwner - the container widget that will contain this widget. Will be NULL if the widget is being added to the scene's list of children.

InitializePlayerTracking[edit]

native final virtual function InitializePlayerTracking ()

Sets up the focus, input, and any other arrays which contain data that tracked uniquely for each active player. Ensures that the arrays responsible for managing focus chains are synched up with the Engine.GamePlayers array.

InsertChild[edit]

native function int InsertChild (UIObject NewChild, optional int InsertIndex, optional bool bRenameExisting)

Insert a widget at the specified location

Parameters:

  • NewChild - the widget to insert
  • InsertIndex - the position to insert the widget. If not specified, the widget is insert at the end of the list
  • bRenameExisting - controls what happens if there is another widget in this widget's Children list with the same tag as NewChild. if TRUE, renames the existing widget giving a unique transient name. if FALSE, does not add NewChild to the list and returns FALSE.

Returns:

the position that that the child was inserted in, or INDEX_NONE if the widget was not inserted

IsActive[edit]

native final noexport function bool IsActive (optional int PlayerIndex) const

Returns TRUE if this widget has a UIState_Active object in its StateStack

Parameters:

  • PlayerIndex - the index of the player to check

IsEnabled[edit]

native final noexport function bool IsEnabled (optional int PlayerIndex, optional bool bCheckOwnerChain) const

Returns TRUE if this widget has a UIState_Enabled object in its StateStack

Parameters:

  • PlayerIndex - the index of the player to check
  • bCheckOwnerChain - by default, the owner chain is checked as well; specify FALSE to override this behavior.

IsFocused[edit]

native final noexport function bool IsFocused (optional int PlayerIndex) const

Returns TRUE if this widget has a UIState_Focused object in its StateStack

Parameters:

  • PlayerIndex - the index of the player to check

IsHoldingAlt[edit]

native final virtual function bool IsHoldingAlt (int ControllerId)

Returns TRUE if the player associated with the specified ControllerId is holding the Alt key

Fixme: doesn't currently respect the value of ControllerId

IsHoldingCtrl[edit]

native final virtual function bool IsHoldingCtrl (int ControllerId)

Returns TRUE if the player associated with the specified ControllerId is holding the Ctrl key

Fixme: doesn't currently respect the value of ControllerId

IsHoldingShift[edit]

native final virtual function bool IsHoldingShift (int ControllerId)

Returns TRUE if the player associated with the specified ControllerId is holding the Shift key

Fixme: doesn't currently respect the value of ControllerId

IsInitialized[edit]

native final noexport function bool IsInitialized ()

Returns whether this screen object has been initialized.

IsNeverFocused[edit]

native final function bool IsNeverFocused () const

Getter for bNeverFocus

IsPressed[edit]

native final noexport function bool IsPressed (optional int PlayerIndex) const

Returns TRUE if this widget has a UIState_Pressed object in its StateStack

Parameters:

  • PlayerIndex - the index of the player to check

KillFocus[edit]

native function bool KillFocus (UIScreenObject Sender, optional int PlayerIndex)

Deactivates the focused state for this widget.

Parameters:

  • Sender - the control that called KillFocus.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

NavigateFocus[edit]

native function bool NavigateFocus (UIScreenObject Sender, UIRoot.EUIWidgetFace Direction, optional int PlayerIndex)

Sets focus to the widget bound to the navigation link for specified direction of the Sender. This function is used for navigation between controls in scenes that support unbound (i.e. any direction) navigation.

Parameters:

  • Sender - Control that called NavigateFocus. Possible values are: - if NULL is specified, it indicates that this is the first step in a focus change. The widget will attempt to set focus to its most eligible child widget. If there are no eligible child widgets, this widget will enter the focused state and start propagating the focus chain back up through the Owner chain by calling SetFocus on its Owner widget. - if Sender is the widget's owner, it indicates that we are in the middle of a focus change. Everything else proceeds the same as if the value for Sender was NULL. - if Sender is a child of this widget, it indicates that focus has been successfully changed, and the focus is now being propagated upwards. This widget will now enter the focused state and continue propagating the focus chain upwards through the owner chain.
  • Direction - the direction to navigate focus.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

TRUE if the next child widget in the navigation network for the specified direction successfully received focus.

NextControl[edit]

native function bool NextControl (UIScreenObject Sender, optional int PlayerIndex)

Sets focus to the next control in the tab order (relative to Sender) for widget. If Sender is the last control in the tab order, propagates the call upwards to this widget's parent widget.

Parameters:

  • Sender - the widget to use as the base for determining which control to focus next
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

TRUE if we successfully set focus to the next control in tab order. FALSE if Sender was the last eligible child of this widget or we couldn't otherwise set focus to another control.

OverrideLastFocusedControl[edit]

native final function OverrideLastFocusedControl (int PlayerIndex, UIObject ChildToFocus)

Manually sets the last focused control for this widget; only necessary in cases where a particular child should be given focus but this widget (me) doesn't currently have focus. Setting the last focused control to the ChildToFocus will make it so that ChildToFocus is given focus the next time this widget does.

PixelToCanvas[edit]

native final function Object.Vector PixelToCanvas (const out Object.Vector2D PixelPosition) const

Transforms a 2D screen coordinate into this widget's local space in canvas coordinates. In other words, converts a screen point into what that point would be on this widget if this widget wasn't rotated.

Parameters:

  • PixelPosition - the position of the 2D point; a value from 0 - size of the viewport.

Returns:

a 2D screen coordinate corresponding to where PixelPosition would be if this widget was not rotated.

PixelToScreen[edit]

native final function Object.Vector4 PixelToScreen (const out Object.Vector2D PixelPosition) const

Transforms a vector from pixel (viewport pixels) space into screen (D3D device) space

Parameters:

  • PixelPosition - a vector representing a location in viewport pixel space

Returns:

a vector representing that location in screen space.

PrevControl[edit]

native function bool PrevControl (UIScreenObject Sender, optional int PlayerIndex)

Sets focus to the previous control in the tab order (relative to Sender) for widget. If Sender is the first control in the tab order, propagates the call upwards to this widget's parent widget.

Parameters:

  • Sender - the widget to use as the base for determining which control to focus next
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

Returns:

TRUE if we successfully set focus to the previous control in tab order. FALSE if Sender was the first eligible child of this widget or we couldn't otherwise set focus to another control.

Project[edit]

native final function Object.Vector Project (const out Object.Vector CanvasPosition) const

Converts a coordinate from this widget's local space (that is, tranformed by the widget's rotation) into a 2D viewport location, in pixels.

Parameters:

  • CanvasPosition - a vector representing a location in widget local space.

Returns:

a coordinate representing a point on the screen in pixel space

RebuildNavigationLinks[edit]

native function RebuildNavigationLinks ()

Immediately rebuilds the navigation links between the children of this screen object and recalculates the child that should be the first & last focused control.

RemoveChild[edit]

native final noexport function bool RemoveChild (UIObject ExistingChild, optional array<UIObjectExclusionSet)

Remove an existing child widget from this widget's children

Parameters:

  • ExistingChild - the widget to remove
  • ExclusionSet - used to indicate that multiple widgets are being removed in one batch; useful for preventing references between the widgets being removed from being severed.

Returns:

TRUE if the child was successfully removed from the list, or if the child was not contained by this widget FALSE if the child could not be removed from this widget's child list.

Note: noexport because non-const optional arrays aren't exported correctly by the script compiler.

RemoveChildren[edit]

native final function array<UIObjectRemoveChildren (array<UIObjectChildrenToRemove)

Removes a group of children from this widget's Children array. All removal notifications are delayed until all children have been removed; useful for removing a group of child widgets without destroying the references between them.

Parameters:

  • ChildrenToRemove - the list of child widgets to remove

Returns:

a list of children that could not be removed; if the return array is emtpy, all children were successfully removed.

RemovePlayerData[edit]

native final virtual function RemovePlayerData (int PlayerIndex, LocalPlayer RemovedPlayer)

Called when a player has been removed from the list of active players (i.e. split-screen players)

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was located
  • RemovedPlayer - the player that was removed

ReplaceChild[edit]

native final function bool ReplaceChild (UIObject ExistingChild, UIObject NewChild)

Replace an existing child widget with the specified widget.

Parameters:

  • ExistingChild - the widget to remove
  • NewChild - the widget to replace ExistingChild with

Returns:

TRUE if the ExistingChild was successfully replaced with the specified NewChild; FALSE otherwise.

RequestFormattingUpdate[edit]

native final noexport function RequestFormattingUpdate ()

Flag the scene to refresh all string formatting at the beginning of the next tick.

RequestPrimitiveReview[edit]

native final noexport function RequestPrimitiveReview (bool bReinitializePrimitives, bool bReviewPrimitiveUsage)

Notifies the owning UIScene that the primitive usage in this scene has changed and sets flags in the scene to indicate that 3D primitives have been added or removed.

Parameters:

  • bReinitializePrimitives - specify TRUE to have the scene detach all primitives and reinitialize the primitives for the widgets which have them. Normally TRUE if we have ADDED a new child to the scene which supports primitives.
  • bReviewPrimitiveUsage - specify TRUE to have the scene re-evaluate whether its bUsesPrimitives flag should be set. Normally TRUE if a child which supports primitives has been REMOVED.

RequestSceneUpdate[edit]

native final noexport function RequestSceneUpdate (bool bDockingStackChanged, bool bPositionsChanged, bool bNavLinksOutdated, bool bWidgetStylesChanged)

Tell the scene that it needs to be udpated

Parameters:

  • bDockingStackChanged - if TRUE, the scene will rebuild its DockingStack at the beginning the next frame
  • bPositionsChanged - if TRUE, the scene will update the positions for all its widgets at the beginning of the next frame
  • bNavLinksOutdated - if TRUE, the scene will update the navigation links for all widgets at the beginning of the next frame
  • bWidgetStylesChanged - if TRUE, the scene will refresh the widgets reapplying their current styles

ScreenToCanvas[edit]

native final function Object.Vector ScreenToCanvas (const out Object.Vector4 ScreenPosition) const

Transforms a vector from screen (D3D device space) space into canvas (widget local) space

Parameters:

  • ScreenPosition - a vector representing a location in screen space.

Returns:

a vector representing that location in screen space.

ScreenToPixel[edit]

native final function Object.Vector2D ScreenToPixel (const out Object.Vector4 ScreenPosition) const

Transforms a vector from screen (D3D device space) into pixel (viewport pixels) space.

Parameters:

  • ScreenPosition - a vector representing a location in device space

Returns:

a vector representing that location in pixel space.

SetEnabled[edit]

native function bool SetEnabled (bool bEnabled, int PlayerIndex)

Attempts to set the object to the enabled/disabled state specified.

Parameters:

  • bEnabled - Whether to enable or disable the widget.
  • PlayerIndex - Player index to set the state for.

Returns:

TRUE if the operation was successful, FALSE otherwise.

SetFocus[edit]

native function bool SetFocus (UIScreenObject Sender, optional int PlayerIndex)

Activates the focused state for this widget and sets it to be the focused control of its parent (if applicable)

Parameters:

  • Sender - Control that called SetFocus. Possible values are: - if NULL is specified, it indicates that this is the first step in a focus change. The widget will attempt to set focus to its most eligible child widget. If there are no eligible child widgets, this widget will enter the focused state and start propagating the focus chain back up through the Owner chain by calling SetFocus on its Owner widget. - if Sender is the widget's owner, it indicates that we are in the middle of a focus change. Everything else proceeds the same as if the value for Sender was NULL. - if Sender is a child of this widget, it indicates that focus has been successfully changed, and the focus is now being propagated upwards. This widget will now enter the focused state and continue propagating the focus chain upwards through the owner chain.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

SetFocusToChild[edit]

native function bool SetFocusToChild (optional UIObject ChildToFocus, optional int PlayerIndex)

Sets focus to the specified child of this widget.

Parameters:

  • ChildToFocus - the child to set focus to. If not specified, attempts to set focus to the most elibible child, as determined by navigation links and FocusPropagation values.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated the focus change.

SetPosition[edit]

native final function SetPosition (float NewValue, UIRoot.EUIWidgetFace Face, UIRoot.EPositionEvalType InputType, optional bool bZeroOrigin)

Changes this widget's position to the specified value for the specified face.

Parameters:

  • NewValue - the new value (in pixels or percentage) to use
  • Face - indicates which face to change the position for
  • InputType - indicates the format of the input value EVALPOS_None: NewValue will be considered to be in whichever format is configured as the ScaleType for the specified face EVALPOS_PercentageOwner: EVALPOS_PercentageScene: EVALPOS_PercentageViewport: Indicates that NewValue is a value between 0.0 and 1.0, which represents the percentage of the corresponding base's actual size. EVALPOS_PixelOwner EVALPOS_PixelScene EVALPOS_PixelViewport Indicates that NewValue is an actual pixel value, relative to the corresponding base.
  • bZeroOrigin - FALSE indicates that the value specified includes the origin offset of the viewport.