The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UIInteraction (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> Interaction >> UIInteraction
Package: 
Engine
Within class: 
GameViewportClient
Known classes within UIInteraction:
GameUISceneClient, UTGameUISceneClient
Direct subclass:
UTGameInteraction
This class in other games:
UDK

Controls the UI system. Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Constants[edit]

DEFAULT_UISKIN[edit]

Value: "DefaultUISkin.DefaultSkin"

the default UISkin - used whenever the skin specified by UISkinName couldn't be loaded

Properties[edit]

AxisEmulationDefinitions[edit]

Type: Map{FName,struct FUIAxisEmulationDefinition}

Modifiers: const, native, transient

Runtime mapping of the axis button-press emulation configurations. Built in UIInteraction::InitializeAxisInputEmulations() based on the values retrieved from UIInputConfiguration.

AxisInputEmulation[edit]

Type: UIAxisEmulationData

Array size: 4 (MAX_SUPPORTED_GAMEPADS)

Modifiers: transient

Tracks the axis key-press emulation data for all players in the game.

AxisRepeatDelay[edit]

Type: float

Modifiers: const, config

The amount of time (in seconds) to wait between generating simulated button presses from axis input.

Default value: 0.2

bCaptureUnprocessedInput[edit]

Type: bool

Modifiers: const, config

Controls whether the UI system should prevent the game from recieving input whenever it's active. For games with interactive menus that remain on-screen during gameplay, you'll want to change this value to FALSE.

Default value: True

bDisableToolTips[edit]

Type: bool

Modifiers: const, config

Globally enables/ disables widget tooltips.

bFocusedStateRules[edit]

Type: bool

Modifiers: const, config

if this is TRUE, then focused widgets will not appear to become "active" when moused over - their appearance will remain "focused"

Default value: True

bFocusOnActive[edit]

Type: bool

Modifiers: const, config

Controls whether widgets automatically receive focus when they become active. Set TRUE to enable this behavior.

bIsUIPrimitiveSceneInitialized[edit]

Type: bool

Modifiers: const, transient

TRUE if the scene for rendering 3d prims on this UI has been initialized

bProcessInput[edit]

Type: bool

Modifiers: const, transient

Indicates whether there are any active scenes capable of processing input. Set in UpdateInputProcessingStatus, based on whether there are any active scenes which are capable of processing input.

CanvasScene[edit]

Type: pointer{class FCanvasScene}

Modifiers: const, native, transient

canvas scene for rendering 3d primtives/lights. Created during Init

DataStoreManager[edit]

Type: DataStoreClient

Modifiers: const, transient

Manages all persistent global data stores. Created when UIInteraction is initialized using the value of GEngine.DataStoreClientClass.

DoubleClickPixelTolerance[edit]

Type: int

Modifiers: const, config

The maximum number of pixels to allow between the current mouse position and the last click's mouse position for a double-click event to be triggered

Default value: 1

DoubleClickTriggerSeconds[edit]

Type: float

Modifiers: const, config

The maximum amount of time (in seconds) that can pass between a key press and key release in order to trigger a double-click event

Default value: 0.5

MouseButtonRepeatDelay[edit]

Type: float

Modifiers: const, config

The amount of time (in seconds) to wait between generating repeat events for mouse buttons (which are not handled by windows).

Default value: 0.15

MouseButtonRepeatInfo[edit]

Type: UIKeyRepeatData

Modifiers: const, transient

Tracks the mouse button that is currently being held down for simulating repeat input events.

SceneClient[edit]

Type: GameUISceneClient

Modifiers: const, transient

Acts as the interface between the UIInteraction and the active scenes.

SceneClientClass[edit]

Type: class<GameUISceneClient>

the class to use for the scene client

Default value: Class'Engine.GameUISceneClient'

SupportedDoubleClickKeys[edit]

Type: array<name>

Modifiers: transient

list of keys that can trigger double-click events

ToolTipExpirationSeconds[edit]

Type: float

Modifiers: const, config

determines the number of seconds to display a tooltip before it will automatically be hidden

Default value: 5.0

ToolTipInitialDelaySeconds[edit]

Type: float

Modifiers: const, config

determines how many seconds must pass after a tooltip has been activated before it is made visible

Default value: 0.25

UIAxisMultiplier[edit]

Type: float

Modifiers: const, config

Mouse & joystick axis input will be multiplied by this amount in the UI system. Higher values make the cursor move faster.

Default value: 1.0

UIInputConfig[edit]

Type: UIInputConfiguration

Modifiers: const, transient, public

Singleton object which stores ui key mapping configuration data.

UIJoystickDeadZone[edit]

Type: float

Modifiers: const, config

The amount of movement required before the UI will process a joystick's axis input.

Default value: 0.9

UISkinName[edit]

Type: string

Modifiers: config

The path name for the UISkin that should be used

Default value: "UI_InGameHud.UTHUDSkin"

UISoundCueNames[edit]

Type: array<name>

Modifiers: config

The names of all UISoundCues that can be used in the game.

Default value, index 0: 'GenericError'

Default value, index 1: 'MouseEnter'

Default value, index 2: 'MouseExit'

Default value, index 3: 'Clicked'

Default value, index 4: 'Focused'

Default value, index 5: 'SceneOpened'

Default value, index 6: 'SceneClosed'

Default value, index 7: 'ListSubmit'

Default value, index 8: 'ListUp'

Default value, index 9: 'ListDown'

Default value, index 10: 'SliderIncrement'

Default value, index 11: 'SliderDecrement'

Default value, index 12: 'NavigateUp'

Default value, index 13: 'NavigateDown'

Default value, index 14: 'NavigateLeft'

Default value, index 15: 'NavigateRight'

Default value, index 16: 'CheckboxChecked'

Default value, index 17: 'CheckboxUnchecked'

Default value, index 18: 'StartGame'

Default value, index 19: 'RefreshServers'

WidgetInputAliasLookupTable[edit]

Type: Map{UClass*,struct FUIInputAliasClassMap*}

Modifiers: const, native, transient

Runtime generated lookup table that maps a widget class to its list of input key aliases

Structs[edit]

UIAxisEmulationData[edit]

Extends: UIKeyRepeatData

Modifiers: native, transient

Contains parameters for emulating button presses using axis input.

bool bEnabled 
Determines whether to emulate button presses.

UIKeyRepeatData[edit]

Modifiers: native, transient

Tracks information relevant to simulating IE_Repeat input events.

name CurrentRepeatKey 
The name of the axis input key that is currently being held. Used to determine which type of input event

to simulate (i.e. IE_Pressed, IE_Released, IE_Repeat)

Object.double NextRepeatTime 
The time (in seconds since the process started) when the next simulated input event will be generated.

Functions[edit]

Static native functions[edit]

GetDataStoreClient[edit]

static native noexport final function DataStoreClient GetDataStoreClient ()

Returns a reference to the global data store client, if it exists.

Returns:

the global data store client for the game.

GetPlayerControllerId[edit]

static native noexport final function int GetPlayerControllerId (int PlayerIndex)

Retrieves the ControllerId for the player specified.

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player to retrieve the ControllerId for

Returns:

the ControllerId for the player at the specified index in the GamePlayers array, or INDEX_NONE if the index is invalid

GetPlayerCount[edit]

static native noexport final function int GetPlayerCount () const

Returns the number of players currently active.

GetPlayerIndex[edit]

static native noexport final function int GetPlayerIndex (int ControllerId)

Retrieves the index (into the Engine.GamePlayers array) for the player which has the ControllerId specified

Parameters:

  • ControllerId - the gamepad index of the player to search for

Returns:

the index [into the Engine.GamePlayers array] for the player that has the ControllerId specified, or INDEX_NONE if no players have that ControllerId

IsMenuLevel[edit]

static native noexport final function bool IsMenuLevel (optional string MapName)

Determines whether a map is the default local map.

Parameters:

  • MapName - if specified, checks whether MapName is the default local map; otherwise, checks the currently loaded map.

Returns:

TRUE if the map is the default local (or front-end) map.

Static events[edit]

CanPlayOnline[edit]

static final event bool CanPlayOnline (int ControllerId)

Returns:

Returns whether or not the specified player can play online.

GetLoginStatus[edit]

static final event OnlineSubsystem.ELoginStatus GetLoginStatus (int ControllerId)

Returns:

Returns the current login status for the specified controller id.

GetNATType[edit]

static final event OnlineSubsystem.ENATType GetNATType ()

Wrapper for getting the NAT type

HasLinkConnection[edit]

static final event bool HasLinkConnection ()

Returns:

Returns the current status of the platform's network connection.

IsLoggedIn[edit]

static final event bool IsLoggedIn (int ControllerId, optional bool bRequireOnlineLogin)

Returns:

Returns whether or not the specified player is logged in at all.

Native functions[edit]

CreateScene[edit]

native final function coerce UIScene CreateScene (class<UISceneSceneClass, optional name SceneTag, optional UIScene SceneTemplate)

Creates an instance of the scene class specified. Used to create scenes from unrealscript. Does not initialize the scene - you must call OpenScene, passing in the result of this function as the scene to be opened.

Parameters:

  • SceneClass - the scene class to open
  • SceneTag - if specified, the scene will be given this tag when created
  • SceneTemplate - if specified, will be used as the template for the newly created scene if it is a subclass of SceneClass

Returns:

a UIScene instance of the class specified

CreateTransientWidget[edit]

native final function coerce UIObject CreateTransientWidget (class<UIObjectWidgetClass, name WidgetTag, optional UIObject Owner)

Create a temporary widget for presenting data from unrealscript

Parameters:

  • WidgetClass - the widget class to create
  • WidgetTag - the tag to assign to the widget.
  • Owner - the UIObject that should contain the widget

Returns:

a pointer to a fully initialized widget of the class specified, contained within the transient scene

PlayUISound[edit]

native final function bool PlayUISound (name SoundCueName, optional int PlayerIndex)

Plays the sound cue associated with the specified name

Parameters:

  • SoundCueName - the name of the UISoundCue to play; should corresond to one of the values of the UISoundCueNames array.
  • PlayerIndex - allows the caller to indicate which player controller should be used to play the sound cue. For the most part, all sounds can be played by the first player, regardless of who generated the play sound event.

Returns:

TRUE if the sound cue specified was found in the currently active skin, even if there was no actual USoundCue associated with that UISoundCue.

Other instance functions[edit]

CloseScene[edit]

final function bool CloseScene (UIScene Scene)

Removes the specified scene from the ActiveScenes array.

Parameters:

  • Scene - the scene to deactivate

Returns:

true if the scene was successfully removed from the ActiveScenes array

FindSceneByTag[edit]

final function UIScene FindSceneByTag (name SceneTag, optional LocalPlayer SceneOwner)

Searches through the ActiveScenes array for a UIScene with the tag specified

Parameters:

  • SceneTag - the name of the scene to locate
  • SceneOwner - the player that should be associated with the new scene. Will be assigned to the scene's PlayerOwner property.

Returns:

pointer to the UIScene that has a SceneName matching SceneTag, or NULL if no scenes in the ActiveScenes stack have that name

GetTransientScene[edit]

final function UIScene GetTransientScene ()

Get a reference to the transient scene, which is used to contain transient widgets that are created by unrealscript

Returns:

pointer to the UIScene that owns transient widgets

MergeScene[edit]

function bool MergeScene (UIScene SourceScene, optional UIScene SceneTarget)

Merge 2 existing scenes together in to one

Parameters:

  • SourceScene - The Scene to merge
  • SceneTarget - This optional param is the scene to merge in to. If it's none, the currently active scene will be used. RON: Fix me and remove the child version in UTGameInteraction

NotifyGameSessionEnded[edit]

function NotifyGameSessionEnded ()

Overrides: Interaction.NotifyGameSessionEnded

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

NotifyPlayerAdded[edit]

function NotifyPlayerAdded (int PlayerIndex, LocalPlayer AddedPlayer)

Overrides: Interaction.NotifyPlayerAdded

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[edit]

function NotifyPlayerRemoved (int PlayerIndex, LocalPlayer RemovedPlayer)

Overrides: Interaction.NotifyPlayerRemoved

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

OpenScene[edit]

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

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.

Returns:

TRUE if the scene was successfully opened

SetMousePosition[edit]

final 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)