Cogito, ergo sum

UE3:UIScreenObject (UT3)

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

Contents

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

Base class for all UI entities which can appear onscreen

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties[edit]

Property group 'Focus'[edit]

bNeverFocus[edit]

Type: bool

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

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 'Presentation'[edit]

bHidden[edit]

Type: bool

Modifiers: private

Controls whether the screen object is visible

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

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 '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 'Splitscreen'[edit]

PlayerInputMask[edit]

Type: byte

A bitmask representing the player indexes that this control will process input for, where the value is generated by left bitshifting by the index of the player. A value of 255 indicates that this control will process input from all players. A value of 1 << 1 indicate that only input from player at index 1 will be acccepted, etc. So value of 3 means that this control processes input from players at indexes 0 and 1. Input from player indexes that do not match the mask will be ignored.

Default value: 255

Property group 'States'[edit]

InactiveStates[edit]

Type: array<UIState>

Modifiers: const, instanced

list of states that this screen object can enter

Internal variables[edit]

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.

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.

OnPreRenderCallBack[edit]

delegate OnPreRenderCallBack ()

If set, this delegate will be called as directly before rendering

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.

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

Native functions[edit]

See UIScreenObject native functions.

Events[edit]

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 255), 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 called Initialize on its children.

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

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.

SetInputMask[edit]

event SetInputMask (byte NewInputMask, optional bool bRecurse)

Changes the player input mask for this control, which controls which players this control will accept input from.

Parameters:

  • NewInputMask - the new mask that should be assigned to this control
  • bRecurse - if TRUE, calls SetInputMask on all child controls as well.

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.

Other instance functions[edit]

CanPlayOnline[edit]

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

GetBestControllerId[edit]

function int GetBestControllerId ()

Returns:

the ControllerId for this widget's owner scene's PlayerOwner, or the player that the owning scene last received input from. If the owning scene is NULL, the PlayerOwner is NULL, and no input has been received, returns INDEX_NONE.

GetLoginStatus[edit]

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.

HasLinkConnection[edit]

function bool HasLinkConnection ()

Returns:

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

IsHidden[edit]

final function bool IsHidden ()

Accessor for private variable

Returns:

true if this object is hidden

IsVisible[edit]

final function bool IsVisible ()

Accessor for private variable

Returns:

true if this object is visible

LogCurrentState[edit]

function LogCurrentState (int Indent)


OnChangeVisibility[edit]

function OnChangeVisibility (UIAction_ChangeVisibility Action)

Kismet Action Handlers

OnConsoleCommand[edit]

function OnConsoleCommand (UIAction_ConsoleCommand Action)


OnSetControllerId[edit]

function OnSetControllerId (UIAction_SetControllerId Action)

Handler function for the SetControllerId action.

OnShowAchievementsUI[edit]

function OnShowAchievementsUI (UIAction_ShowAchievementsUI Action)

Displays the achievements UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowContentMarketplaceUI[edit]

function OnShowContentMarketplaceUI (UIAction_ShowContentMarketplaceUI Action)

Displays the marketplace UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowFeedbackUI[edit]

function OnShowFeedbackUI (UIAction_ShowFeedbackUI Action)

Displays the feedback UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowFriendInviteUI[edit]

function OnShowFriendInviteUI (UIAction_ShowFriendInviteUI Action)

Displays the friends invite UI

Parameters:

  • Action - ignored

OnShowFriendsUI[edit]

function OnShowFriendsUI (UIAction_ShowFriendsUI Action)

Displays the friends UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowGamerCardUI[edit]

function OnShowGamerCardUI (UIAction_ShowGamerCardUI Action)

Displays the gamercard UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowMembershipMarketplaceUI[edit]

function OnShowMembershipMarketplaceUI (UIAction_ShowMembershipMarketplaceUI Action)

Displays the marketplace UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowMessagesUI[edit]

function OnShowMessagesUI (UIAction_ShowMessagesUI Action)

Displays the messages UI

Parameters:

  • Action - used to determine which player is requesting the action

OnShowPlayersUI[edit]

function OnShowPlayersUI (UIAction_ShowPlayersUI Action)

Displays the players UI

Parameters:

  • Action - used to determine which player is requesting the 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.