Mostly Harmless

UE3:UTUIScene (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:02, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 8))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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

See UTUIScene constants.

Properties

Property group 'Editor'

bEditorRealTimePreview

Type: bool

Modifiers: transient


Property group 'Flags'

bIgnoreAxisInput

Type: bool


Internal variables

bHidingScene

Type: bool

Modifiers: transient


bShouldPerformScriptTick

Type: bool

Whether to call script tick for this scene

bShowingScene

Type: bool

Modifiers: transient

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

bSkipPendingCloseSceneNotify

Type: bool

Modifiers: transient

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

InputBoxScene

Type: UIScene

Modifiers: transient


MessageBoxScene

Type: UIScene

Modifiers: transient

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

PendingCloseScene

Type: UIScene

Modifiers: transient

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

PendingOpenScene

Type: UIScene

Modifiers: transient

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

PendingPlayerOwnerIndex

Type: int

Modifiers: transient


Default values

Property Value
SceneSkin UISkin'UI_Skin_Derived.UTDerivedSkin'

Subobjects

SceneEventComponent

Class: Engine.UIComp_Event

Inherits from: UIScene.SceneEventComponent

No new values.

Delegates

OnHideAnimationEnded

delegate OnHideAnimationEnded ()

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

OnSceneOpened

delegate OnSceneOpened (UIScene OpenedScene, bool bInitialActivation)

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

OnShowAnimationEnded

delegate OnShowAnimationEnded ()

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

Functions

Static functions

ClearScreenWarningMessage

static function ClearScreenWarningMessage ()

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

FindDataStore

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

Returns:

Returns a datastore given its tag and player owner.

GetGameInterface

static function OnlineGameInterface GetGameInterface ()

Returns:

Returns a reference to the online subsystem game interface.

GetPlayerInterface

static function OnlinePlayerInterface GetPlayerInterface ()

Returns:

Returns a reference to the online subsystem player interface.

GetPlayerInterfaceEx

static function OnlinePlayerInterfaceEx GetPlayerInterfaceEx ()

Returns:

Returns a reference to the online subsystem player interface ex.

ShowScreenWarningMessage

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

static function UIScene StaticOpenScene (UIScene SceneToOpen)

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

TrimWhitespace

static function string TrimWhitespace (string InString)

Trims whitespace from the beginning and end of a string.

Native functions

ActivateLevelEvent

native function ActivateLevelEvent (name EventName)

Activates a level remote event in kismet.

GetPawnOwner

native function Pawn GetPawnOwner ()

Returns the Pawn associated with this Hud

GetUTPlayerOwner

native function UTPlayerController GetUTPlayerOwner (optional int PlayerIndex)

Get the UTPlayerController that is associated with this Hud

IsGame

native function bool IsGame ()

Returns:

the contents of GIsGame

SetScreenResolution

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

native function StartDedicatedServer (string TravelURL)

Starts a dedicated server and kills the current process.

ViewportDeProject

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

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

CloseScene

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

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

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

event TickScene (float DeltaTime)

Called every frame if bShouldPerformScriptTick is true

Parameters:

  • DeltaTime - is the time in seconds for this frame

UIAnimationEnded

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

Overrides: UIScene.UIAnimationEnded

Called when an animation on this scene has finished.

Other instance functions

BeginHideAnimation

function bool BeginHideAnimation (bool bClosingScene)

Starts the exit animation for the scene.

Returns:

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

BeginShowAnimation

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

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

Returns:

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

ConsoleCommand

final function ConsoleCommand (string Cmd, optional bool bWriteToLog)

Executes a console command.

Parameters:

  • string - Cmd Command to execute.

DisplayMessageBox

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

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

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

function string GetCommonOptionsURL ()

Returns:

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

GetInputBoxScene

function UTUIScene_InputBox GetInputBoxScene ()

Returns:

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

GetMessageBoxScene

function UTUIScene_MessageBox GetMessageBoxScene (optional UIScene SceneReference)

Returns:

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

GetPlayerControllerId

function int GetPlayerControllerId (int PlayerIndex)

Returns:

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

GetPlayerIndex

function int GetPlayerIndex ()

Returns:

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

GetPlayerName

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

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

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

function UTPlayerReplicationInfo GetPRIOwner ()

Returns the PRI associated with this hud

GetUTInteraction

function UTGameInteraction GetUTInteraction ()

Returns:

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

NotifyChildGameSessionEnded

function NotifyChildGameSessionEnded (UIObject Child)


NotifyGameSessionEnded

function NotifyGameSessionEnded ()

Overrides: UIScene.NotifyGameSessionEnded

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

OnCurrentScene_HideAnimationEnded

function OnCurrentScene_HideAnimationEnded ()

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

OnPendingCloseScene_HideAnimationEnded

function OnPendingCloseScene_HideAnimationEnded ()

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

OpenSceneByName

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

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

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

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.