Mostly Harmless

UE3:UIScreenObject (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject

Contents

Package: 
Engine
Known classes within UIScreenObject:
UIComponent, UIComp_Event, UIPreviewString, UIString
Direct subclasses:
UIObject, UIScene
This class in other games:
UT3

Base class for all UI entities which can appear onscreen

Properties[edit]

Property group 'Animation'[edit]

KeyFrameCompletedDelegates[edit]

Type: array<delegate<OnUIAnim_KeyFrameCompleted> >

Modifiers: editconst, transient, private

the list of functions to call when animation tracks and keyframes are completed.

TrackCompletedDelegates[edit]

Type: array<delegate<OnUIAnim_TrackCompleted> >

Modifiers: editconst, transient, private


Property group 'Appearance'[edit]

bHidden[edit]

Type: bool

Modifiers: private

Controls whether the screen object is visible

InactiveStates[edit]

Type: array<UIState>

Modifiers: const, editconst, instanced

list of states that this screen object can enter

Opacity[edit]

Type: float

the opacity of the object

Default value: 1.0

Position[edit]

Type: UIRoot.UIScreenValue_Bounds

The location of this screen object

Default value:

Member Value
ScaleType[0] EVALPOS_PercentageOwner
ScaleType[1] EVALPOS_PercentageOwner
ScaleType[2] EVALPOS_PercentageOwner
ScaleType[3] EVALPOS_PercentageOwner
Value[2] 1.0
Value[3] 1.0

ZDepth[edit]

Type: float

Modifiers: private

Controls how the widget is sorted by the rendering code; higher values push the widget "away" from the screen, while lower values bring the widget "closer" to the screen

Property group 'Interaction'[edit]

bNeverFocus[edit]

Type: bool

Modifiers: private, const

Indicates that this widget should never become the focused control; does not prevent children of this widget from receiving focus (that must be done by calling SetPrivateBehavior(PRIVATE_NotFocusable,true))

bSupportsFocusHint[edit]

Type: bool

Controls whether this widget displays a hint when it's the focused control.

FocusPropagation[edit]

Type: array<UIRoot.UIFocusPropagationData>

Modifiers: transient

Determines which children of this widget should receive focus when this widget receives focus. Each element of this array corresponds to the player at the same array index in the Engine.GamePlayers array.

Property group 'Sound'[edit]

FocusedCue[edit]

Type: name

this sound is played when this widget becomes the focused control

Default value: 'Focused'

MouseEnterCue[edit]

Type: name

this sound is played when this widget becomes the active control

NavigateDownCue[edit]

Type: name

this sound is played when this widget has a navigate down event

Default value: 'NavigateDown'

NavigateLeftCue[edit]

Type: name

this sound is played when this widget has a navigate left event

Default value: 'NavigateLeft'

NavigateRightCue[edit]

Type: name

this sound is played when this widget has a navigate right event

Default value: 'NavigateRight'

NavigateUpCue[edit]

Type: name

this sound is played when this widget has a navigate up event

Default value: 'NavigateUp'

Property group 'ZDebug'[edit]

AnimationDebugMultiplier[edit]

Type: float

Modifiers: globalconfig

globally modifies the rate for all UI animations - for debugging

Default value: 1.0

Internal variables[edit]

AnimationCount[edit]

Type: int

Modifiers: transient, protected

counter used to track how many animations within this widget (including children) are currently active.

AnimStack[edit]

Type: array<UIAnimation.UIAnimSequence>

Modifiers: transient

This is the stack of animations currently being applied to this widget

bAnimating[edit]

Type: bool

Modifiers: transient, protected

indicates whether this widget (or any of its children) are currently animating

bAnimationPaused[edit]

Type: bool

Modifiers: transient, protected

When true the animation does not tick

bInitialized[edit]

Type: bool

Modifiers: transient

Indicates whether this widget has been initialized. Set from UUIScene/UUIObject::Initialize, immediately after the base version of Initialized has been called, but before Initialize() has been called on the children of the widget.

bOverrideInputOrder[edit]

Type: bool

Modifiers: private, const

indicates that this control should always have the first chance to process input received by the owning scene

bSupports3DPrimitives[edit]

Type: bool

Modifiers: const

Indicates whether this widget uses 3D primitives.

Children[edit]

Type: array<UIObject>

Modifiers: protected, noimport

list of UIObjects which are owned by this UIObject

DefaultStates[edit]

Type: array<class<UIState> >

Modifiers: const

The states that should exist in this widget's InactiveStates array by default. When the widget is initialized, the InactiveStates array is iterated through, and if there are no states in the InactiveStates array that have a class matching a DefaultState, a new UIState object of that class is instanced and placed into the InactiveStates array.

Default value, index 0: Class'Engine.UIState_Enabled'

Default value, index 1: Class'Engine.UIState_Disabled'

EventProvider[edit]

Type: UIComp_Event


FocusControls[edit]

Type: array<UIRoot.PlayerInteractionData>

Modifiers: transient, const

The children of this widget that are in special states (i.e. focused control, last focused control, etc.) Each element of this array corresponds to the player at the same array index in the Engine.GamePlayers array.

InitialState[edit]

Type: class<UIState>

Specifies the UIState that this widget will automatically enter when it is initialized.

Default value: Class'Engine.UIState_Enabled'

StateStack[edit]

Type: array<UIState>

Modifiers: transient, const

stack of states this widget is currently using

Delegates[edit]

NotifyActiveSkinChanged[edit]

delegate NotifyActiveSkinChanged ()

Called when the currently active skin has been changed. Reapplies this widget's style and propagates the notification to all children.

Note: this delegate is only called if it is actually assigned to a member function.

NotifyActiveStateChanged[edit]

delegate transient NotifyActiveStateChanged (UIScreenObject Sender, int PlayerIndex, UIState NewlyActiveState, optional UIState PreviouslyActiveState)

Called when a new UIState becomes the widget's currently active state, after all activation logic has occurred.

Parameters:

  • Sender - the widget that changed states.
  • PlayerIndex - the index [into the GamePlayers array] for the player that activated this state.
  • NewlyActiveState - the state that is now active
  • PreviouslyActiveState - the state that used the be the widget's currently active state.

NotifyPositionChanged[edit]

delegate NotifyPositionChanged (UIScreenObject Sender)

Called whenever this object changes its position

NotifyResolutionChanged[edit]

delegate NotifyResolutionChanged (const out Object.Vector2D OldViewportsize, const out Object.Vector2D NewViewportSize)

Called when the viewport rendering this widget's scene is resized.

Parameters:

  • OldViewportSize - the previous size of the viewport
  • NewViewportSize - the new size of the viewport

NotifyVisibilityChanged[edit]

delegate NotifyVisibilityChanged (UIScreenObject SourceWidget, bool bIsVisible)

Allows others to receive a notification when this widget's visibility status changes.

Parameters:

  • SourceWidget - the widget that changed visibility status
  • bIsVisible - whether this widget is now visible.

OnInitialSceneUpdate[edit]

delegate transient OnInitialSceneUpdate ()

Called just before the scene perform its first update. This is first time it's guaranteed to be safe to call functions which require a valid viewport, such as SetPosition/GetPosition

OnProcessInputAxis[edit]

delegate bool OnProcessInputAxis (const out UIRoot.SubscribedInputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using UI input aliases (i.e. Clicked, NextControl, etc.)

Called when an input axis event is received which this widget responds to and is in the correct state to process. The axis and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called AFTER kismet is given a chance to process the input, but BEFORE any native code processes the input.

Parameters:

  • EventParms - information about the input event, including the name of the input alias associated with the current key name (Tab, Space, etc.), event type (Pressed, Released, etc.) and modifier keys (Ctrl, Alt)

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

OnProcessInputKey[edit]

delegate bool OnProcessInputKey (const out UIRoot.SubscribedInputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using UI input aliases (i.e. Clicked, NextControl, etc.)

Called when an input key event is received which this widget responds to and is in the correct state to process. The keys and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called AFTER kismet is given a chance to process the input, but BEFORE any native code processes the input.

Parameters:

  • EventParms - information about the input event, including the name of the input alias associated with the current key name (Tab, Space, etc.), event type (Pressed, Released, etc.) and modifier keys (Ctrl, Alt)

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

OnRawInputAxis[edit]

delegate bool OnRawInputAxis (const out UIRoot.InputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using UI input aliases (i.e. Left, Tab, etc.)

Called when an input axis event is received which this widget responds to and is in the correct state to process. The axis and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called BEFORE kismet is given a chance to process the input.

Parameters:

  • EventParms - information about the input event.

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

OnRawInputKey[edit]

delegate bool OnRawInputKey (const out UIRoot.InputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using actual input key names (i.e. Left, Tab, etc.)

Called when an input key event is received which this widget responds to and is in the correct state to process. The keys and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called BEFORE kismet is given a chance to process the input.

Parameters:

  • EventParms - information about the input event.

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

OnUIAnim_KeyFrameCompleted[edit]

delegate private OnUIAnim_KeyFrameCompleted (UIScreenObject Sender, name AnimName, UIAnimation.EUIAnimType TrackType)

Callback which is triggered when a single key-frame of an active UI animation sequence is finished running. You must call Add_UIAnim_KeyFrameCompletedHandler to subscribe to this delegate.

Parameters:

  • Sender - the widget that owns the animation sequence
  • AnimName - the name of the sequence containing the key-frame that finished.
  • TrackType - the identifier for the track containing the key-frame that completed.

OnUIAnim_TrackCompleted[edit]

delegate private OnUIAnim_TrackCompleted (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Callback which is triggered when all key-frames in a single track of an active UI animation sequence have completed. You must call Add_UIAnimTrackCompletedHandler to subscribe to this delegate.

Parameters:

  • Sender - the widget executing the animation containing the track that just completed
  • AnimName - the name of the animation sequence containing the track that completed.
  • TrackTypeMask - a bitmask of EUIAnimType values indicating which animation tracks completed. The value is generated by left shifting 1 by the value of the track type. A value of 0 indicates that all tracks have completed (in other words, that the entire animation sequence is completed).

Functions[edit]

Static native functions[edit]

GetActivePlayerCount[edit]

native static final noexport function int GetActivePlayerCount ()

Returns the number of active split-screen players.

PlayUISound[edit]

native static final noexport function bool PlayUISound (name SoundCueName, optional int PlayerIndex)

Plays the sound cue associated with the specified name; simple wrapper for UIInteraction.PlayUISound

Parameters:

  • SoundCueName - the name of the UISoundCue to play; should corresond to one of the values of the UISoundCueNames array.
  • PlayerIndex - allows the caller to indicate which player controller should be used to play the sound cue. For the most part, all sounds can be played by the first player, regardless of who generated the play sound event.

Returns:

TRUE if the sound cue specified was found in the currently active skin, even if there was no actual USoundCue associated with that UISoundCue.

Note: noexport because the native version is a static method of UUIScreenObject

ResolveUIExtent[edit]

static native final function float ResolveUIExtent (out const UIRoot.UIScreenValue_Extent ExtentToResolve, UIScreenObject OwnerWidget, UIRoot.EUIExtentEvalType OutputType) const

Resolves a UIScreenValue_Extent into a pixel value.

Parameters:

  • ExtentToResolve - the extent that needs to be resolved into pixels.
  • OwnerWidget - the widget that contains this extent value
  • OutputType - indicates the desired format for the result UIEXTENTEVAL_Pixels: Result should be the actual number of pixels UIEXTENTEVAL_PercentOwner: result should be formatted as a percentage of the widget's parent UIEXTENTEVAL_PercentScene: result should be formatted as a percentage of the scene UIEXTENTEVAL_PercentViewport: result should be formatted as a percentage of the viewport

Returns:

the value [in pixels] for the specified extent

Other static functions[edit]

GetLoggedInControllerIds[edit]

static final function GetLoggedInControllerIds (out array<intControllerIds, optional bool bRequireOnlineLogin, optional int MaxPlayersToCheck)


GetLoggedInPlayerCount[edit]

static final function int GetLoggedInPlayerCount (optional bool bRequireOnlineLogin, optional int MaxPlayersToCheck)

Wrapper for getting the number of signed in players

HasLinkConnection[edit]

static final function bool HasLinkConnection ()

Returns:

Returns the current status of the platform's network connection.

Native functions[edit]

See UIScreenObject native functions.

Events[edit]

ActivateFocusHint[edit]

event bool ActivateFocusHint (UIObject FocusHintObject)

Provides script-only child classes with a hook for manipulating the focus hint widget. Only called if this widget has a value of TRUE for bSupportsFocusHint.

Parameters:

  • FocusHintObject - reference to the widget that supplies the focus hint.

Returns:

TRUE if the initialization/repositioning of the focus hint object was handled in script.

ActivateKeyFrameCompletedDelegates[edit]

event ActivateKeyFrameCompletedDelegates (UIScreenObject Sender, name AnimName, UIAnimation.EUIAnimType TrackType)

Calls each function in the list of delegates subscribed for key-frame completions.

Parameters:

  • Sender - the widget that owns the animation sequence
  • AnimName - the name of the sequence containing the key-frame that finished.
  • TrackType - the identifier for the track containing the key-frame that completed.

ActivateTrackCompletedDelegates[edit]

event ActivateTrackCompletedDelegates (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Calls each function in the list of delegates subscribed for animation track completions.

Parameters:

  • Sender - the widget executing the animation containing the track that just completed
  • AnimName - the name of the animation sequence containing the track that completed.
  • TrackTypeMask - a bitmask of EUIAnimType values indicating which animation tracks completed. The value is generated by left shifting 1 by the value of the track type. A value of 0 indicates that all tracks have completed (in other words, that the entire animation sequence is completed).

AddedChild[edit]

event AddedChild (UIScreenObject WidgetOwner, UIObject NewChild)

Called immediately after a child has been added to this screen object.

Parameters:

  • WidgetOwner - the screen object that the NewChild was added as a child for
  • NewChild - the widget that was added

DisablePlayerInput[edit]

final event DisablePlayerInput (byte PlayerIndex, optional bool bRecurse)

Disables input processing in this widget for the player located at the specified index of the Engine.GamePlayers array. If this control is no longer masking any players (i.e. the new PlayerInputMask would be 0), the input mask will be reset to allow input from any player.

Parameters:

  • GamepadIndex - the gamepad that this control should no longer respond to input for.
  • bRecurse - propagate the new input mask to all children of this control.

EnablePlayerInput[edit]

final event EnablePlayerInput (byte PlayerIndex, optional bool bRecurse)

Enables input processing in this widget for the player located at the specified index of the Engine.GamePlayers array. If this control is not currently masking input (i.e. its PlayerInputMask is 0xF), the input mask will be set to only allow input from the player index specified.

Parameters:

  • PlayerIndex - the index of the player that this control should now respond to input for.
  • bRecurse - propagate the new input mask to all children of this control.

GetSupportedUIActionKeyNames[edit]

event GetSupportedUIActionKeyNames (out array<nameout_KeyNames)

Allow Script to add UI Actions

Initialized[edit]

event Initialized ()

Called once this screen object has been completely initialized, before it has activated its InitialState or called Initialize on its children. This event is only called the first time a widget is initialized. If reparented, for example, the widget would already be initialized so the Initialized event would not be called.

IsGamepadConnected[edit]

event final bool IsGamepadConnected (int ControllerId)

Wrapper for determining whether a controller is connected. Not affected by whether a player is active on that gamepad.

Parameters:

  • ControllerId - the id of the gamepad to check connectivity for. If not specified, uses the gamepad id of the player that owns this menu.

Returns:

TRUE if the gamepad is currently connected and turned on.

IsLoggedIn[edit]

event bool IsLoggedIn (optional int ControllerId, optional bool bRequireOnlineLogin)

Returns:

Returns whether or not the player with the specified controller id is logged in

PostInitialize[edit]

event PostInitialize ()

Called after this screen object's children have been initialized. While the Initialized event is only called when a widget is initialized for the first time, PostInitialize() will be called every time this widget receives a call to Initialize(), even if the widget was already initialized. Examples would be reparenting a widget.

RemovedChild[edit]

event RemovedChild (UIScreenObject WidgetOwner, UIObject OldChild, optional array<UIObjectExclusionSet)

Called immediately after a child has been removed from this screen object.

Parameters:

  • WidgetOwner - the screen object that the widget was removed from.
  • OldChild - the widget that was removed
  • 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. NOTE: If a value is specified, OldChild will ALWAYS be part of the ExclusionSet, since it is being removed.

RemovedFromParent[edit]

event RemovedFromParent (UIScreenObject WidgetOwner)

Notification that this widget's parent is about to remove this widget from its children array. Allows the widget to clean up any references to the old parent.

Parameters:

  • WidgetOwner - the screen object that this widget was removed from.

SetVisibility[edit]

event SetVisibility (bool bIsVisible)

Changes whether this widget is visible or not. Should be overridden in child classes to perform additional logic or abort the visibility change.

Parameters:

  • bIsVisible - TRUE if the widget should be visible; false if not.

UIAnimationEnded[edit]

event UIAnimationEnded (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Notification that one or more tracks in an animation sequence have completed.

Parameters:

  • Sender - the widget that completed animating.
  • AnimName - the name of the animation sequence that completed.
  • TypeMask - a bitmask indicating which animation tracks completed. It is generated by left shifting 1 by the values of the EUIAnimType enum. A value of 0 indicates that all tracks in the animation sequence have finished.

UIAnimationStarted[edit]

event UIAnimationStarted (UIScreenObject Sender, name AnimName, int TrackTypeMask, optional bool bSetAnimatingFlag)

Notification that an animation sequence has been activated.

Parameters:

  • Sender - the widget that owns the animation sequence that was activated
  • AnimName - the name of the animation sequence that was activated.
  • TypeMask - a bitmask indicating which animation tracks were activated. It is generated by left shifting 1 by the values of the EUIAnimType enum. A value of 0 indicates that all tracks in the animation sequence are being activated.
  • bSetAnimatingFlag - indicates whether this widget should mark itself as animating.

Other instance functions[edit]

Add_UIAnimKeyFrameCompletedHandler[edit]

final function Add_UIAnimKeyFrameCompletedHandler (delegate<OnUIAnim_KeyFrameCompletedKeyFrameCompletedDelegate)

Adds a function to the list of callbacks that receive notification that a UI animation key-frame has completed.

for now, these just assign...encapsulated like this to make it easy to change the delegate assignment into a list, for example eventually, these will add the passed in value to an array of delegates (once animation is being handled by a component)

Add_UIAnimTrackCompletedHandler[edit]

final function Add_UIAnimTrackCompletedHandler (delegate<OnUIAnim_TrackCompletedTrackCompletedDelegate)

Adds a function to the list of callbacks that receive notification that a UI animation tracks has completed.

for now, these just assign...encapsulated like this to make it easy to change the delegate assignment into a list, for example eventually, these will add the passed in value to an array of delegates (once animation is being handled by a component)

BecomePrimaryPlayer[edit]

function BecomePrimaryPlayer (int PlayerIndex)

Makes a player the primary player

Parameters:

  • PlayerIndex - The index of the player to be made into the primary player

CanPlayOnline[edit]

final function bool CanPlayOnline (int ControllerId)

Returns:

Returns whether or not the specified player can play online.

DisableWidget[edit]

final function bool DisableWidget (int PlayerIndex)


EnableWidget[edit]

final function bool EnableWidget (int PlayerIndex)

wrapper for enabling/disabling widgets

Find_UIAnimKeyFrameCompletedHandler[edit]

final function int Find_UIAnimKeyFrameCompletedHandler (delegate<OnUIAnim_KeyFrameCompletedKeyFrameCompletedDelegate)

Finds the location of a function in the list of callbacks for key-frame completion.

Find_UIAnimTrackCompletedHandler[edit]

final function int Find_UIAnimTrackCompletedHandler (delegate<OnUIAnim_TrackCompletedTrackCompletedDelegate)

Finds the location of a function in the list of callbacks for key-frame completion.

GetLoginStatus[edit]

final function OnlineSubsystem.ELoginStatus GetLoginStatus (int ControllerId)

Returns:

Returns the current login status for the specified controller id.

GetNATType[edit]

function OnlineSubsystem.ENATType GetNATType ()

Wrapper for getting the NAT type

GetParent[edit]

function UIScreenObject GetParent ()

Returns the scene or widget that contains this widget in its Children array.

LogCurrentState[edit]

function LogCurrentState (int Indent)


OnConsoleCommand[edit]

function OnConsoleCommand (UIAction_ConsoleCommand Action)


PrivateSetVisibility[edit]

final private function PrivateSetVisibility (bool bVisible)

Changes this widget's visibility. Do not change this method to be public - if you need to bypass overrides of SetVisibility, use the Super/Super(UIScreenObject) syntax.

Parameters:

  • bVisible - specify FALSE to hide the widget.

Remove_UIAnimKeyFrameCompletedHandler[edit]

final function Remove_UIAnimKeyFrameCompletedHandler (delegate<OnUIAnim_KeyFrameCompletedKeyFrameCompletedDelegate)

Removes a function from the list of callbacks that are fired when UI animation keyframes are completed.

Remove_UIAnimTrackCompletedHandler[edit]

final function Remove_UIAnimTrackCompletedHandler (delegate<OnUIAnim_TrackCompletedTrackCompletedDelegate)

Removes a function from the list of callbacks that are fired when UI animation tracks are completed.