Mostly Harmless

Difference between revisions of "UE3:UTUIScene (UDK)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Talk)
m (1 revision: class descriptions for UDK January update (part 8))
 
(No difference)

Latest revision as of 06:02, 17 January 2010

UDK Object >> UIRoot >> UIScreenObject >> UIScene >> UTUIScene

Contents

Package: 
UTGame
Direct subclasses:
UTUIFrontEnd, UTUIFrontEnd_MapSelection, UTUIFrontEnd_TitleScreen, UTUIScene_Hud, UTUIScene_MessageBox, UTUIScene_OnlineToast, UTUIScene_SaveProfile
This class in other games:
UT3

Our UIScenes provide PreRender and tick passes to our Widgets

Constants[edit]

See UTUIScene constants.

Properties[edit]

Property group 'Editor'[edit]

bEditorRealTimePreview[edit]

Type: bool

Modifiers: transient


Property group 'Flags'[edit]

bIgnoreAxisInput[edit]

Type: bool


Internal variables[edit]

bHidingScene[edit]

Type: bool

Modifiers: transient


bShouldPerformScriptTick[edit]

Type: bool

Whether to call script tick for this scene

bShowingScene[edit]

Type: bool

Modifiers: transient

Animation flags, used by the tick function to determine which update func to call.

bSkipPendingCloseSceneNotify[edit]

Type: bool

Modifiers: transient

Whether or not to skip the kismet notify for the close scene that is pending.

InputBoxScene[edit]

Type: UIScene

Modifiers: transient


MessageBoxScene[edit]

Type: UIScene

Modifiers: transient

Global scene references, only scenes that are used in-game and in-menus should be referenced here.

PendingCloseScene[edit]

Type: UIScene

Modifiers: transient

Pending scene to close since we are waiting for the current scene's exit animation to end.

PendingOpenScene[edit]

Type: UIScene

Modifiers: transient

Pending scene to open since we are waiting for the current scene's exit animation to end.

PendingPlayerOwnerIndex[edit]

Type: int

Modifiers: transient


Default values[edit]

Property Value
SceneSkin UISkin'UI_Skin_Derived.UTDerivedSkin'

Subobjects[edit]

SceneEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UIScene.SceneEventComponent

No new values.

Delegates[edit]

OnHideAnimationEnded[edit]

delegate OnHideAnimationEnded ()

Callback for when the scene's hide animation has ended.

OnSceneOpened[edit]

delegate OnSceneOpened (UIScene OpenedScene, bool bInitialActivation)

Callback for when a scene has opened after hiding the topmost scene.

OnShowAnimationEnded[edit]

delegate OnShowAnimationEnded ()

Callback for when the scene's show animation has ended.

Functions[edit]

Static functions[edit]

ClearScreenWarningMessage[edit]

static function ClearScreenWarningMessage ()

Clears the screen warning message if one was set. It will no longer be rendered.

FindDataStore[edit]

static function UIDataStore FindDataStore (name DataStoreTag, optional LocalPlayer InPlayerOwner)

Returns:

Returns a datastore given its tag and player owner.

GetGameInterface[edit]

static function OnlineGameInterface GetGameInterface ()

Returns:

Returns a reference to the online subsystem game interface.

GetPlayerInterface[edit]

static function OnlinePlayerInterface GetPlayerInterface ()

Returns:

Returns a reference to the online subsystem player interface.

GetPlayerInterfaceEx[edit]

static function OnlinePlayerInterfaceEx GetPlayerInterfaceEx ()

Returns:

Returns a reference to the online subsystem player interface ex.

ShowScreenWarningMessage[edit]

static function ShowScreenWarningMessage (string Message)

Displays a screen warning message. This message will be displayed prominently centered in the viewport and will persist until you call ClearScreenWarningMessage(). It's useful for important modal warnings, such as when the controller is disconnected on a console platform.

Parameters:

  • Message - Message to display

StaticOpenScene[edit]

static function UIScene StaticOpenScene (UIScene SceneToOpen)

Opens a scene without any special hiding animation for previous scenes.

TrimWhitespace[edit]

static function string TrimWhitespace (string InString)

Trims whitespace from the beginning and end of a string.

Native functions[edit]

ActivateLevelEvent[edit]

native function ActivateLevelEvent (name EventName)

Activates a level remote event in kismet.

GetPawnOwner[edit]

native function Pawn GetPawnOwner ()

Returns the Pawn associated with this Hud

GetUTPlayerOwner[edit]

native function UTPlayerController GetUTPlayerOwner (optional int PlayerIndex)

Get the UTPlayerController that is associated with this Hud

IsGame[edit]

native function bool IsGame ()

Returns:

the contents of GIsGame

SetScreenResolution[edit]

native function SetScreenResolution (int ResX, int ResY, bool bFullscreen)

Sets the screen resolution.

Parameters:

  • ResX - Width of the screen
  • ResY - Height of the screen
  • bFullscreen - Whether or not we are fullscreen.

StartDedicatedServer[edit]

native function StartDedicatedServer (string TravelURL)

Starts a dedicated server and kills the current process.

ViewportDeProject[edit]

native function ViewportDeProject (LocalPlayer LocalPlayerOwner, Object.Vector ScreenLocation, out Object.Vector OutLocation, out Object.Vector OutDirection)

Converts a 2D Screen coordiate in to 3D space

Parameters:

  • LocalPlayerOwner - The LocalPlayer that owns the viewport where the projection occurs
  • ScreenLocation - Where on the screen are we converting from
  • OutLocation - Returns the Location in world space
  • OutDirection - Returns the view direction

ViewportProject[edit]

native function ViewportProject (LocalPlayer LocalPlayerOwner, Object.Vector WorldLocation, out Object.Vector OutScreenLocation)

Converts a 2D Screen coordiate in to 3D space

Parameters:

  • LocalPlayerOwner - The LocalPlayer that owns the viewport where the projection occurs
  • WorldLocation - The world location to project to
  • OutScreenLocation - Returns the location in 2D space

Events[edit]

CloseScene[edit]

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

Overrides: UIScene.CloseScene

Closes a UI Scene given a reference to an previously open scene.

Parameters:

  • SceneToClose - Scene that we want to close.
  • bSkipKismetNotify - Whether or not to close the kismet notify for the scene.
  • bSkipAnimation - Whether or not to skip the close animation for this scene.

IsControllerInput[edit]

event bool IsControllerInput (name KeyName)

Returns whether or not the input passed in is a gamepad input event.

Parameters:

  • KeyName - Key name to check

Returns:

Returns TRUE if the input key is from a gamepad, FALSE otherwise.

OpenScene[edit]

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

Overrides: UIScene.OpenScene

Opens a UI Scene given a reference to a scene to open.

Parameters:

  • SceneToOpen - Scene that we want to open.
  • bSkipAnimation - specify TRUE to indicate that opening animations should be bypassed.
  • SceneDelegate - if specified, will be called when the scene has finished opening.

TickScene[edit]

event TickScene (float DeltaTime)

Called every frame if bShouldPerformScriptTick is true

Parameters:

  • DeltaTime - is the time in seconds for this frame

UIAnimationEnded[edit]

event UIAnimationEnded (UIScreenObject AnimTarget, name AnimName, int TrackType)

Overrides: UIScene.UIAnimationEnded

Called when an animation on this scene has finished.

Other instance functions[edit]

BeginHideAnimation[edit]

function bool BeginHideAnimation (bool bClosingScene)

Starts the exit animation for the scene.

Returns:

TRUE if there's animation for this scene, FALSE otherwise.

BeginShowAnimation[edit]

function bool BeginShowAnimation (bool bInitialActivation, bool bBypassAnimation)

Starts the show animation for the scene.

Parameters:

  • bInitialActivation - TRUE if the scene is being opened; FALSE if the another scene was closed causing this one to become the topmost scene.
  • bBypassAnimation - TRUE to force all animations to their last frame, effectively bypassing animations. This can be necessary for e.g. scenes which start out off-screen or something.

Returns:

TRUE if there's animation for this scene, FALSE otherwise.

CheckLinkConnectionAndError[edit]

function bool CheckLinkConnectionAndError (optional string AlternateTitle, optional string AlternateMessage)

Returns:

Checks to see if the platform is currently connected to a network.

ConsoleCommand[edit]

final function ConsoleCommand (string Cmd, optional bool bWriteToLog)

Executes a console command.

Parameters:

  • string - Cmd Command to execute.

DisplayMessageBox[edit]

function UTUIScene_MessageBox DisplayMessageBox (string Message, optional string Title)

Displays a very simple OK message box with the specified message and title.

Parameters:

  • Message - Message markup for the messagebox
  • Title - Title markup for the messagebox

Returns:

Returns a reference to the message box scene that was displayed.

FinishCloseScene[edit]

function FinishCloseScene (UIScene SceneToClose, bool bSkipAnimations, bool bSkipKismetNotify)

Closes a UI Scene given a reference to an previously open scene.

Parameters:

  • SceneToClose - Scene that we want to close.

FinishOpenScene[edit]

function UIScene FinishOpenScene (UIScene SceneToOpen, bool bSkipAnimation, bool bSkipKismetNotify)

Finishes opening a scene, usually called when a hide animation has ended.

Parameters:

  • SceneToOpen - the scene to open
  • bSkipAnimation - specify TRUE to bypass the scene's opening animation
  • bSkipKismetNotify - specify TRUE to prevent the 'OpeningMenu' level event from being activated.

Returns:

reference to the UIScene instance that was opened.

GetCommonOptionsURL[edit]

function string GetCommonOptionsURL ()

Returns:

Generates a set of URL options common to both instant action and host game.

GetInputBoxScene[edit]

function UTUIScene_InputBox GetInputBoxScene ()

Returns:

Opens the input box scene and returns a reference to it.

GetMessageBoxScene[edit]

function UTUIScene_MessageBox GetMessageBoxScene (optional UIScene SceneReference)

Returns:

Opens the message box scene and returns a reference to it.

GetPlayerControllerId[edit]

function int GetPlayerControllerId (int PlayerIndex)

Returns:

Returns the controller id of a player given its player index.

GetPlayerIndex[edit]

function int GetPlayerIndex ()

Returns:

Returns the player index of the player owner for this scene.

GetPlayerName[edit]

function string GetPlayerName (int PlayerIndex)

Returns:

Returns the name of the specified player if they have an alias or are logged in, or "DefaultPlayer" otherwise.

GetPlayerProfile[edit]

function UTProfileSettings GetPlayerProfile (optional int PlayerIndex)

Returns the Player Profile for a given player index.

Parameters:

  • PlayerIndex - The player who's profile you require

Returns:

the profile precast to UTProfileSettings

GetPlayerProfileFromPC[edit]

function UTProfileSettings GetPlayerProfileFromPC (PlayerController PC)

Returns the Player Profile for a given player index.

Parameters:

  • PC - The PlayerContorller of the profile you require.

Returns:

the profile precast to UTProfileSettings

GetPRIOwner[edit]

function UTPlayerReplicationInfo GetPRIOwner ()

Returns the PRI associated with this hud

GetUTInteraction[edit]

function UTGameInteraction GetUTInteraction ()

Returns:

Return a reference to the UT specific version of the UI interaction.

NotifyChildGameSessionEnded[edit]

function NotifyChildGameSessionEnded (UIObject Child)


NotifyGameSessionEnded[edit]

function NotifyGameSessionEnded ()

Overrides: UIScene.NotifyGameSessionEnded

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

OnCurrentScene_HideAnimationEnded[edit]

function OnCurrentScene_HideAnimationEnded ()

Callback for when the current scene's hide animation has completed.

OnPendingCloseScene_HideAnimationEnded[edit]

function OnPendingCloseScene_HideAnimationEnded ()

Callback for when the scene we are closing's hide animation has completed.

OpenSceneByName[edit]

function UIScene OpenSceneByName (string SceneToOpen, bool bSkipAnimation, optional delegate<UIScene.OnSceneActivatedSceneDelegate)

Opens a UI Scene given a reference to a scene to open.

Parameters:

  • SceneToOpen - Scene that we want to open.

PlaySound[edit]

function PlaySound (SoundCue InSoundCue)

Allows easy access to playing a sound

Parameters:

  • InSoundCue - The Cue to play
  • SoundLocation - Where in the world to play it. Defaults at the Player's position

SavePlayerProfile[edit]

function SavePlayerProfile (optional int PlayerIndex)

Saves the profile for the specified player index.

Parameters:

  • PlayerIndex - The player index of the player to save the profile for.

SetupButtonBar[edit]

function SetupButtonBar ()

Function that sets up a buttonbar for this scene, automatically routes the call to the currently selected tab of the scene as well.