Gah - a solution with more questions. – EntropicLqd

UE3:UISceneClient (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UISceneClient
Package: 
Engine
Direct subclasses:
EditorUISceneClient, GameUISceneClient
This class in other games:
UDK

Serves as the interface between a UIScene and scene owners. Provides scenes with all data necessary for operation and routes rendering to the scenes.

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

Properties[edit]

ActiveControl[edit]

Type: UIObject

Modifiers: const, transient

Represents the widget/scene that is currently under the mouse cursor.

Fixme: splitscreen

ActiveSkin[edit]

Type: UISkin

Modifiers: transient

The active UISkin. Only one UISkin can be active at a time. The special data store name 'Styles' always corresponds to the ActiveSkin.

bEnablePostProcess[edit]

Type: bool

Modifiers: transient

if TRUE then post processing is enabled using the UIScenePostProcess

CanvasToScreen[edit]

Type: Object.Matrix

Modifiers: const, transient

Stores the 3D projection matrix being used to render the UI.

DataStoreManager[edit]

Type: DataStoreClient

Modifiers: const, transient

Manager all persistent global data stores. Set by the object that creates the scene client.

InvCanvasToScreen[edit]

Type: Object.Matrix

Modifiers: const, transient


MousePosition[edit]

Type: Object.IntPoint

Modifiers: const, transient

the location of the mouse

Fixme: splitscreen

OpacityParameter[edit]

Type: MaterialInstanceConstant

Modifiers: transient

Material instance parameter for UI widget opacity.

OpacityParameterName[edit]

Type: name

Modifiers: const, transient

Name of the opacity parameter.

RenderViewport[edit]

Type: pointer{FViewport}

Modifiers: const, transient, native

the viewport to use for rendering scenes

UIScenePostProcess[edit]

Type: PostProcessChain

Modifiers: transient

Post process chain to be applied when rendering UI Scenes

Functions[edit]

Native functions[edit]

ChangeActiveSkin[edit]

native final noexport function bool ChangeActiveSkin (UISkin NewActiveSkin)

Changes the active skin to the skin specified, initializes the skin and performs all necessary cleanup and callbacks. This method should only be called from script.

Parameters:

  • NewActiveScene - The skin to activate

Returns:

TRUE if the skin was successfully changed.

ChangeMouseCursor[edit]

native final virtual function bool ChangeMouseCursor (name CursorName)

Changes the resource that is currently being used as the mouse cursor. Called by widgets as they changes states, or when some action occurs which affects the mouse cursor.

Parameters:

  • CursorName - the name of the mouse cursor resource to use. Should correspond to a name from the active UISkin's MouseCursorMap

Returns:

TRUE if the cursor was successfully changed.

CloseScene[edit]

native function bool CloseScene (UIScene Scene)

Deactivates the specified scene, as well as all scenes which occur after the specified scene in the list of active scenes.

Parameters:

  • Scene - the scene to deactivate

Returns:

true if the scene was successfully deactivated

GetCanvasToScreen[edit]

native final function Object.Matrix GetCanvasToScreen (optional const UIObject Widget) const

Returns the current canvas to screen projection matrix.

Parameters:

  • Widget - if specified, the returned matrix will include the widget's tranformation matrix as well.

Returns:

a matrix which can be used to project 2D pixel coordines into 3D screen coordinates. ??

GetInverseCanvasToScreen[edit]

native final function Object.Matrix GetInverseCanvasToScreen (optional const UIObject Widget) const

Returns the inverse of the local to world screen projection matrix.

Parameters:

  • Widget - if specified, the returned matrix will include the widget's tranformation matrix as well.

Returns:

a matrix which can be used to transform normalized device coordinates (i.e. origin at center of screen) into into 0,0 based pixel coordinates. ??

InitializeScene[edit]

native final noexport function bool InitializeScene (UIScene Scene, optional LocalPlayer SceneOwner, optional out UIScene InitializedScene)

Initializes the specified scene without opening it.

Parameters:

  • Scene - the scene to initialize; if the scene specified is contained in a content package, a copy of the scene will be created, and that scene will be initialized instead.
  • SceneOwner - the player that should be associated with the new scene. Will be assigned to the scene's PlayerOwner property.
  • InitializedScene - the scene that was actually initialized. If Scene is located in a content package, InitializedScene will be the copy of the scene that was created. Otherwise, InitializedScene will be the same as the scene passed in.

Returns:

TRUE if the scene was successfully initialized

Note: noexport to handle the optional out parameter correctly

IsSceneInitialized[edit]

native final noexport function bool IsSceneInitialized (UIScene Scene) const

Returns whether the specified scene has been fully initialized. Different from UUIScene::IsInitialized() in that this method returns true only once all objects related to this scene have been created and initialized (e.g. in the UI editor only returns TRUE once the editor window for this scene has finished creation).

Parameters:

  • Scene - the scene to check.

Note: noexport because the C++ version is a pure virtual

IsUIActive[edit]

native final noexport function bool IsUIActive (optional int Flags) const

Returns true if there is an unhidden fullscreen UI active

Parameters:

  • Flags - a bitmask of values which alter the result of this method; the bits are derived from the ESceneFilterTypes enum (which is native-only); script callers must pass these values literally

Returns:

TRUE if the UI is currently active

OpenScene[edit]

native final noexport function bool OpenScene (UIScene Scene, optional LocalPlayer SceneOwner, optional out UIScene OpenedScene)

Initializes and activates the specified scene.

Parameters:

  • Scene - the scene to open; if the scene specified is contained in a content package, a copy of the scene will be created and the copy will be opened instead.
  • SceneOwner - the player that should be associated with the new scene. Will be assigned to the scene's PlayerOwner property.
  • OpenedScene - the scene that was actually opened. If Scene is located in a content package, OpenedScene will be the copy of the scene that was created. Otherwise, OpenedScene will be the same as the scene passed in.

Returns:

TRUE if the scene was successfully opened

Note: noexport to handle the optional out parameter correctly

SetMousePosition[edit]

native final virtual function SetMousePosition (int NewMouseX, int NewMouseY)

Set the mouse position to the coordinates specified

Parameters:

  • NewX - the X position to move the mouse cursor to (in pixels)
  • NewY - the Y position to move the mouse cursor to (in pixels)

UpdateCanvasToScreen[edit]

native final function noexport UpdateCanvasToScreen ()

Changes the matrix for projecting local (pixel) coordinates into world screen (normalized device) coordinates. This method should be called anytime the viewport size or origin changes.

Other instance functions[edit]

GetActiveScene[edit]

function UIScene GetActiveScene ()

Returns the currently active scene