Gah - a solution with more questions. – EntropicLqd

UE3:UISceneClient (UDK)

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

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

Constants

SCENEFILTER_None

Value: 0x00000000

Used to limit which scenes should be considered when determining whether the UI should be considered "active" Represented in C++ as enums values.

SCENEFILTER_IncludeTransient

Value: 0x00000001

Include the transient scene

SCENEFILTER_InputProcessorOnly

Value: 0x00000002

Consider only scenes which can process input

SCENEFILTER_PausersOnly

Value: 0x00000004

Consider only scenes which require the game to be paused

SCENEFILTER_PrimitiveUsersOnly

Value: 0x00000008

Consider only scenes which support 3D primitives rendering

SCENEFILTER_UsesPostProcessing

Value: 0x00000010

Only consider scenes which render full-screen

SCENEFILTER_ReceivesFocus

Value: 0x00000020

Include only those scenes which can receive focus (i.e. bNeverFocus=false)

SCENEFILTER_Any

Value: 0xFFFFFFFF

Any scene

Properties

ActiveControl

Type: UIObject

Modifiers: const, transient

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

Fixme: splitscreen

ActiveSkin

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

Type: bool

Modifiers: transient

if TRUE then post processing is enabled using the UIScenePostProcess

CanvasToScreen

Type: Object.Matrix

Modifiers: const, transient

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

DataStoreManager

Type: DataStoreClient

Modifiers: const, transient

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

InvCanvasToScreen

Type: Object.Matrix

Modifiers: const, transient


MousePosition

Type: Object.IntPoint

Modifiers: const, transient

the location of the mouse

Fixme: splitscreen

OpacityParameter

Type: MaterialInstanceConstant

Modifiers: transient

Material instance parameter for UI widget opacity.

OpacityParameterName

Type: name

Modifiers: const, transient

Name of the opacity parameter.

RenderViewport

Type: pointer{FViewport}

Modifiers: const, transient, native

the viewport to use for rendering scenes

UIScenePostProcess

Type: PostProcessChain

Modifiers: transient

Post process chain to be applied when rendering UI Scenes

Functions

Native functions

ChangeActiveSkin

native final noexportheader 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

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

native final noexportheader function bool CloseScene (UIScene Scene, optional bool bCloseChildScenes, optional bool bForceCloseImmediately)

Deactivates the specified scene and removes it from the stack of scenes.

Parameters:

  • Scene - the scene to deactivate
  • bCloseChildScenes - normally any scenes which are higher in the stack than the scene being closed are also closed. Specify FALSE To override this behavior.
  • bForceCloseImmediately - indicates that the result of calling the scene's OnQueryCloseSceneAllowed delegate should be ignored; used when closing all scenes as the result of a map change, for example.

Returns:

true if the scene was successfully deactivated

CloseSceneAtIndex

native final noexportheader function bool CloseSceneAtIndex (int SceneStackIndex, optional bool bCloseChildScenes, optional bool bForceCloseImmediately)

Deactivates the scene located at the specified index in the stack of scenes.

Parameters:

  • SceneStackIndex - the index in the stack of scenes for the scene that should be deactivated
  • bCloseChildScenes - normally any scenes which are higher in the stack than the scene being closed are also closed. Specify FALSE To override this behavior.
  • bForceCloseImmediately - indicates that the result of calling the scene's OnQueryCloseSceneAllowed delegate should be ignored; used when closing all scenes as the result of a map change, for example.

Returns:

true if the scene was successfully deactivated

GetCanvasToScreen

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

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

native final noexportheader 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

InsertScene

native final noexportheader function bool InsertScene (int DesiredInsertIndex, UIScene Scene, optional LocalPlayer SceneOwner, optional out UIScene OpenedScene, optional out int ActualInsertIndex, optional byte ForcedPriority)

Instances, initializes, and activates the specified scene, inserting it into the scene stack at the specified location.

Parameters:

  • DesiredInsertIndex - the index [into the ActiveScenes array] to insert the scene. the scene's SceneStackPriority will take precedence over this value.
  • 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.
  • ActualInsertIndex - receives the location where the scene was actually inserted into the scene stack.
  • ForcedPriority - overrides the scene's SceneStackPriority value to allow callers to modify where the scene is placed in the stack.

Returns:

TRUE if the scene was successfully activated and inserted into the scene stack (although not necessarily at the DesiredSceneIndex)

IsSceneInitialized

native final noexportheader 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

native final noexportheader 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

native final noexportheader function bool OpenScene (UIScene Scene, optional LocalPlayer SceneOwner, optional out UIScene OpenedScene, optional byte ForcedPriority)

Adds the specified scene to the list of active scenes, loading the scene and performing initialization as necessary.

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.
  • ForcedPriority - overrides the scene's SceneStackPriority value to allow callers to modify where the scene is placed in the stack, by default.

Returns:

TRUE if the scene was successfully opened

Note: noexport to handle the optional out parameter correctly

ReplaceScene

native final noexportheader function bool ReplaceScene (UIScene SceneInstanceToReplace, UIScene SceneToOpen, optional LocalPlayer SceneOwner, optional out UIScene OpenedScene, optional byte ForcedPriority)

Instances, initializes, and activates a scene, replacing an existing scene's location in the scene stack. The existing scene will be deactivated and no longer part of the scene stack. The location in the scene stack for the new scene instance may be modified if its SceneStackPriority requires the scene stack to be resorted.

Parameters:

  • SceneInstanceToReplace - the scene that should be replaced.
  • SceneToOpen - the scene that will replace the existing scene. If the scene specified is contained in a content package, the scene will be duplicated and the duplicate will be added 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.
  • ForcedPriority - overrides the scene's SceneStackPriority value to allow callers to modify where the scene is placed in the stack.

Returns:

TRUE if the scene was successfully activated and inserted into the scene stack (although not necessarily at the DesiredSceneIndex)

ReplaceSceneAtIndex

native final noexportheader function bool ReplaceSceneAtIndex (int IndexOfSceneToReplace, UIScene SceneToOpen, optional LocalPlayer SceneOwner, optional out UIScene OpenedScene, optional byte ForcedPriority)

Instances, initializes, and activates a scene, replacing an existing scene's location in the scene stack. The existing scene will be deactivated and no longer part of the scene stack. The location in the scene stack for the new scene instance may be modified if its SceneStackPriority requires the scene stack to be resorted.

Parameters:

  • IndexOfSceneToReplace - the index into the stack of scenes for the scene to be replaced.
  • SceneToOpen - the scene that will replace the existing scene. If the scene specified is contained in a content package, the scene will be duplicated and the duplicate will be added 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.
  • ForcedPriority - overrides the scene's SceneStackPriority value to allow callers to modify where the scene is placed in the stack.

Returns:

TRUE if the scene was successfully activated and inserted into the scene stack (although not necessarily at the DesiredSceneIndex)

SetMousePosition

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

native final noexportheader function 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.

Events

InitializeSceneClient

event InitializeSceneClient ()

Called when the scene client is first initialized.