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

UE3:UIScene functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 12:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIScene (functions)

Contents

;Other member categories for this class::properties

Functions

Static native functions

GetWorldInfo

native static function WorldInfo GetWorldInfo ()

Returns the current WorldInfo

Native functions

FindTickableObjectIndex

native final function int FindTickableObjectIndex (UITickableObject ObjectToFind) const

Finds the location of a tickable object.

Parameters:

  • ObjectToFind - the object to search for

Returns:

the index into the scene's TickableObjects array for the specified object, or INDEX_NONE if it isn't found.

ForceImmediateSceneUpdate

native final noexport function ForceImmediateSceneUpdate ()

Triggers an immediate full scene update (rebuilds docking stacks if necessary, resolves scene positions if necessary, etc.); scene updates normally occur at the beginning of each scene's Tick() so this function should only be called if you must change the positions and/or formatting of a widget in the scene after the scene has been ticked, but before it's been rendered.

Note: noexport because this simply calls through to the C++ UpdateScene().

GetActiveContextMenu

native final function UIContextMenu GetActiveContextMenu () const

Returns the scene's currently active context menu, if there is one.

GetDefaultContextMenu

native final function UIContextMenu GetDefaultContextMenu ()

Returns the scene's default context menu widget, creating one if necessary.

GetNextScene

native final function UIScene GetNextScene (bool bRequireMatchingPlayerOwner, optional bool bIgnoreUnfocusedScenes)

Returns the scene that is above this one in the scene client's stack of active scenes.

Parameters:

  • bRequireMatchingPlayerOwner - TRUE indicates that only a scene that has the same value for PlayerOwner as this scene may be considered the "next" scene to this one
  • bIgnoreUnfocusedScenes - indicates that scenes which cannot accept focus should be skipped.

Returns:

a reference to the next scene above this scene in the ActiveScenes array which meets the criteria specified by the input parameters, or None if there isn't one.

GetPreviousScene

native final function UIScene GetPreviousScene (bool bRequireMatchingPlayerOwner, optional bool bIgnoreUnfocusedScenes)

Returns the scene that is below this one in the scene client's stack of active scenes.

Parameters:

  • bRequireMatchingPlayerOwner - TRUE indicates that only a scene that has the same value for PlayerOwner as this scene may be considered the "previous" scene to this one
  • bIgnoreUnfocusedScenes - indicates that scenes which cannot accept focus should be skipped.

Returns:

a reference to the next scene below this scene in the ActiveScenes array which meets the criteria specified by the input parameters, or None if there isn't one.

GetSceneDataStore

native final function SceneDataStore GetSceneDataStore ()

Gets the data store for this scene, creating one if necessary.

GetSceneInputMode

native final noexportheader function UIRoot.EScreenInputMode GetSceneInputMode (optional bool bMemberValueOnly)

Accessor for retrieving the scene's input mode.

Parameters:

  • bMemberValueOnly - specify TRUE to skip calling the delegate and just return the value of SceneInputMode

Returns:

if the scene's GetSceneInputModeOverride delegate is set, returns the result from that. Otherwise, the value of this scene's SceneInputMode.

GetScenePostProcessGroup

native final noexport function UIRoot.EUIPostProcessGroup GetScenePostProcessGroup () const

Accessor for retrieving the scene's configured post-process group.

Returns:

the post-process group that this scene is configured to use.

GetSceneRenderMode

native final noexportheader function UIRoot.ESplitscreenRenderMode GetSceneRenderMode () const

Accessor for retrieving the scene's render mode. Forces render mode to be SPLITRENDER_FullScreen

Returns:

the value of this scene's SceneRenderMode member.

IsSceneActive

native final function bool IsSceneActive (optional bool bTopmostScene) const

Wrapper for easily determining whether this scene is in the scene client's list of active scenes.

Parameters:

  • bTopmostScene - specify TRUE to check whether the scene is also the scene client's topmost scene.

LoadSceneDataValues

native final function LoadSceneDataValues ()

Notifies all children that are bound to readable data stores to retrieve their initial value from those data stores.

LogDockingStack

native final function LogDockingStack () const

Debug function for spewing the scene's docking stack.

RebuildDockingStack

native final function RebuildDockingStack ()

Clears and rebuilds the complete DockingStack. It is not necessary to manually rebuild the DockingStack when simply adding or removing widgets from the scene, since those types of actions automatically updates the DockingStack.

RegisterTickableObject

native final function bool RegisterTickableObject (UITickableObject ObjectToRegister, optional int InsertIndex)

Register an object with the scene so that it receive calls to Tick.

Parameters:

  • ObjectToRegister - the object that should be registered with the scene
  • InsertIndex - the index [into the array of tickable objects] where the object should be inserted; if not specified, adds the object to the end of the list. Provides callers with a way to e.g. guarantee that they receive the call to tick before some other object in the list.

Returns:

TRUE if the object was successfully registered with the scene. FALSE if the object was already in the list or an invalid positive index was specified (other than INDEX_NONE).

ResolveDataStore

native final function UIDataStore ResolveDataStore (name DataStoreTag, optional LocalPlayer InPlayerOwner)

Find the data store that has the specified tag. If the data store's tag is SCENE_DATASTORE_TAG, the scene's data store is returned, otherwise searches through the global data stores for a data store with a Tag matching the specified name.

Parameters:

  • DataStoreTag - A name corresponding to the 'Tag' property of a data store
  • InPlayerOwner - The player owner to use for resolving the datastore. If NULL, the scene's playerowner will be used instead.

Returns:

a pointer to the data store that has a Tag corresponding to DataStoreTag, or NULL if no data were found with that tag.

ResolveScenePositions

native final function ResolveScenePositions ()

Iterates through the scene's DockingStack, and evaluates the Position values for each widget owned by this scene into actual pixel values, then stores that result in the widget's RenderBounds field.

SaveSceneDataValues

native final function SaveSceneDataValues (optional bool bUnbindSubscribers)

Notifies all children of this scene that are bound to writable data stores to publish their values to those data stores.

Parameters:

  • bUnbindSubscribers - if TRUE, all data stores bound by widgets and strings in this scene will be unbound.

SetActiveContextMenu

native final function bool SetActiveContextMenu (UIContextMenu NewContextMenu, int PlayerIndex)

Changes the scene's ActiveContextMenu to the one specified.

Parameters:

  • NewContextMenu - the new context menu to activate, or NULL to clear any active context menus.
  • PlayerIndex - the index of the player to display the context menu for.

Returns:

TRUE if the scene's ActiveContextMenu was successfully changed to the new value.

SetSceneInputMode

native final function SetSceneInputMode (UIRoot.EScreenInputMode NewInputMode)

Changes the screen input mode for this scene.

SetSceneRenderMode

native final noexportheader function SetSceneRenderMode (UIRoot.ESplitscreenRenderMode NewRenderMode)

Accessor for changing the value of this scene's SceneRenderMode var.

ShouldRenderParentScenes

native final function bool ShouldRenderParentScenes () const

Wrapper for checking whether this scene's parent should also be rendered.

UnbindSubscribers

native final function UnbindSubscribers ()

Makes all the widgets in this scene unsubscribe from their bound datastores.

UnregisterTickableObject

native final function bool UnregisterTickableObject (UITickableObject ObjectToRemove)

Unregisters an object with the scene so that it no longer receives calls to Tick.

Parameters:

  • ObjectToRemove - the object that should be removed from the scene's list of tickable objects.

Returns:

TRUE if the object was successfully removed from the scene.

Events

AddedChild

event AddedChild (UIScreenObject WidgetOwner, UIObject NewChild)

Overrides: UIScreenObject.AddedChild

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

CalculateInputMask

final event CalculateInputMask ()

Determines the appropriate PlayerInput mask for this scene, based on the scene's input mode.

CloseScene

event bool CloseScene (optional UIScene SceneToClose, optional bool bCloseChildScenes, optional bool bForceCloseImmediately)

Closes the specified scene, optionally activating the scene's closing animation.

Parameters:

  • SceneToClose - a reference to the scene instance that should be closed; if not specified, closes this scene.
  • bCloseChildScenes - specify FALSE to prevent scenes opened after this one from being automatically closed.
  • bForceCloseImmediately - specify TRUE to indicate that the scene's OnQueryCloseSceneAllowed delegate should be ignored. Usually used in cases where you need to ensure the scene goes away immediately, rather than e.g. activating a close animation which would cause the scene to remain active for a few more frames.

Returns:

TRUE if the scene was closed or the closing animation was activated. FALSE if the scene couldn't be closed and the closing animation wasn't started.

GetFocusHint

event UIObject GetFocusHint (optional bool bQueryOnly)

Callback for retrieving the widget that provides hints about which item is currently focused.

Parameters:

  • bQueryOnly - specify TRUE to indicate that a focus hint should not be created if it doesn't already exist.

Returns:

the widget used for displaying the global focused control hint.

OpenScene

event UIScene OpenScene (UIScene SceneToOpen, optional LocalPlayer ScenePlayerOwner, optional byte ForcedPriority, optional bool bSkipAnimation, optional delegate<OnSceneActivatedSceneDelegate)

Opens a new instance of a UIScene resource, optionally activating the scene's opening animation as well as the currently active scene's focus-lost animations.

Parameters:

  • SceneToOpen - a reference to the scene resource that should be instanced and activated.
  • ScenePlayerOwner - the player that should have control of the scene.
  • ForcedPriority - overrides the scene's SceneStackPriority value to allow callers to modify where the scene is placed in the stack, by default.
  • bSkipAnimation - specify TRUE to indicate that opening animations should be bypassed.
  • SceneDelegate - allows the caller to hook into the new scene's OnSceneActivated delegate.

Returns:

a reference to an instance of the specified scene resource, which is guaranteed to be in the list of active scenes; NULL if the scene couldn't be activated.

RemovedChild

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

Overrides: UIScreenObject.RemovedChild

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.

SceneActivated

event SceneActivated (bool bInitialActivation)

Called just after the scene is added to the ActiveScenes array, or when this scene has become the active scene as a result of closing another scene.

Parameters:

  • bInitialActivation - TRUE if this is the first time this scene is being activated; FALSE if this scene has become active as a result of closing another scene or manually moving this scene in the stack.

SceneDeactivated

event SceneDeactivated ()

Called just after this scene is removed from the active scenes array

SetVisibility

event SetVisibility (bool bIsVisible)

Overrides: UIScreenObject.SetVisibility

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

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

Overrides: UIScreenObject.UIAnimationEnded

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

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

Overrides: UIScreenObject.UIAnimationStarted

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

BeginSceneAnimation

function bool BeginSceneAnimation (name AnimationSequenceName, optional delegate<UIScreenObject.OnUIAnim_TrackCompletedTrackCompletedDelegate)

Wrapper function for activating an animation sequence on this widget.

Parameters:

  • AnimationSequenceName - the name of the animation sequence to activate; should match the 'SeqName' of one of the UIAnimationSeq objects defined in the game scene client class.
  • TrackCompletedDelegate - optional function for receiving a notification when a track in the animation sequence has completed.

Returns:

TRUE if the animation sequence was triggered successfully.

BeginSceneCloseAnimation

function bool BeginSceneCloseAnimation (bool bCloseChildScenes)

Wrapper for activating the scene's closing animation.

Returns:

TRUE if the closing animation was successfully activated.

BeginSceneLostFocusAnimation

function BeginSceneLostFocusAnimation ()

Wrapper for activating the scene's lost-focus animation (this animation is played when a new scene is becoming active).

BeginSceneOpenAnimation

function BeginSceneOpenAnimation ()

Wrapper for activating the scene's opening animation.

BeginSceneRegainedFocusAnimation

function BeginSceneRegainedFocusAnimation ()

Wrapper for activating the scene's reactivate animation, which is played when this scene has just become the top-most scene due to another scene closing.

BeginSceneRegainingFocusAnimation

function BeginSceneRegainingFocusAnimation ()

Wrapper for activating the scene's regain-focus animation, which is played when the next scene up is the top-most scene and it begins to close

DebugShowAnimators

function DebugShowAnimators ()


FindAnimatorIndex

function int FindAnimatorIndex (UIScreenObject SearchObj)

Find the index into the array of currently animating child widgets for a child of this scene.

Parameters:

  • SearchObj - the widget to find the index for.

Returns:

the index into the AnimatingObjects array for the specified object, or INDEX_NONE if it isn't in the array.

LogCurrentState

function LogCurrentState (int Indent)

Overrides: UIScreenObject.LogCurrentState


LogRenderBounds

function LogRenderBounds (int Indent)


NotifyControllerStatusChanged

function NotifyControllerStatusChanged (int ControllerId, bool bConnected)

Called when a gamepad (or other controller) is inserted or removed)

Parameters:

  • ControllerId - the id of the gamepad that was added/removed.
  • bConnected - indicates the new status of the gamepad.

NotifyGameSessionEnded

function NotifyGameSessionEnded ()

Called when the current map is being unloaded. Cleans up any references which would prevent garbage collection.

NotifyLinkStatusChanged

function NotifyLinkStatusChanged (bool bConnected)

Called when the status of the platform's network connection changes.

NotifyLoginStatusChanged

function bool NotifyLoginStatusChanged (int ControllerId, OnlineSubsystem.ELoginStatus NewStatus)

Notification that the login status a player has changed.

Parameters:

  • ControllerId - the id of the gamepad for the player that changed login status
  • NewStatus - the value for the player's current login status

Returns:

TRUE if this scene wishes to handle the event and prevent further processing.

NotifyOnlineServiceStatusChanged

function NotifyOnlineServiceStatusChanged (OnlineSubsystem.EOnlineServerConnectionStatus NewConnectionStatus)

Notification that the player's connection to the platform's online service is changed.

NotifyPlayerAdded

function NotifyPlayerAdded (int PlayerIndex, LocalPlayer AddedPlayer)

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

Parameters:

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

NotifyPlayerRemoved

function NotifyPlayerRemoved (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

NotifyPreClientTravel

function NotifyPreClientTravel (string TravelURL, Actor.ETravelType TravelType, bool bIsSeamless)

Called when the local player is about to travel to a new URL. This callback should be used to perform any preparation tasks, such as updating status text and such. All cleanup should be done from NotifyGameSessionEnded, as that function will be called in some cases where NotifyClientTravel is not.

Parameters:

  • TravelURL - a string containing the mapname (or IP address) to travel to, along with option key/value pairs
  • TravelType - indicates whether the player will clear previously added URL options or not.
  • bIsSeamless - indicates whether seamless travelling will be used.

NotifyStorageDeviceChanged

function NotifyStorageDeviceChanged ()

Called when a storage device is inserted or removed.

OnCloseAnimationComplete

function OnCloseAnimationComplete (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's closing animation

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no closing animation.

OnCloseAnimationComplete_IgnoreChildScenes

function OnCloseAnimationComplete_IgnoreChildScenes (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's closing animation

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no closing animation.

OnLostFocusAnimationComplete

function OnLostFocusAnimationComplete (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's lost-focus animation

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no lost-focus animation.

OnOpenAnimationComplete

function OnOpenAnimationComplete (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's opening animation...

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no opening animation.

OnRegainedFocusAnimationComplete

function OnRegainedFocusAnimationComplete (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's re-activated animation

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no re-activated animation.

OnRegainingFocusAnimationComplete

function OnRegainingFocusAnimationComplete (UIScreenObject Sender, name AnimName, int TrackTypeMask)

Handler for the completion of this scene's 'becoming active again' animation

Warning: if you override this in a child class, keep in mind that this function will not be called if the scene has no 'becoming active again' animation.

SceneCreated

function SceneCreated (UIScene CreatedScene)

Default handler for the OnCreateScene delegate

StopSceneAnimation

function bool StopSceneAnimation (name AnimationSequenceName, optional bool bFinalize)

Wrapper for stopping an active UI animtion sequence.

Parameters:

  • AnimationSequenceName - the name of the animation sequence to stop; should match the 'SeqName' of one of the UIAnimationSeq objects defined in the game scene client class.
  • bFinalize - indicates whether the widget should apply the final frame of the animation (i.e. simulate the animation completing)