Cogito, ergo sum

UE3:UIInteraction (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:24, 17 January 2010 by (Talk)

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

Controls the UI system.

Constants

DEFAULT_UISKIN

Value: "DefaultUISkin.DefaultSkin"

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

Properties

AxisEmulationDefinitions

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

Type: UIAxisEmulationData

Array size: 4 (MAX_SUPPORTED_GAMEPADS)

Modifiers: transient

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

AxisRepeatDelay

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

bDisableToolTips

Type: bool

Modifiers: const, config

Globally enables/ disables widget tooltips.

bFocusedStateRules

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

Type: bool

Modifiers: const, config

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

bIsUIPrimitiveSceneInitialized

Type: bool

Modifiers: const, transient

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

bProcessInput

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

Type: pointer{class FCanvasScene}

Modifiers: const, native, transient

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

DataStoreManager

Type: DataStoreClient

Modifiers: const, transient, private

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

DoubleClickPixelTolerance

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

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

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

Type: UIKeyRepeatData

Modifiers: const, transient

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

SceneClient

Type: GameUISceneClient

Modifiers: const, transient

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

SceneClientClass

Type: class<GameUISceneClient>

the class to use for the scene client

Default value: Class'Engine.GameUISceneClient'

SupportedDoubleClickKeys

Type: array<name>

Modifiers: transient

list of keys that can trigger double-click events

ToolTipExpirationSeconds

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

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

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

Type: UIInputConfiguration

Modifiers: const, transient, public

Singleton object which stores ui key mapping configuration data.

UIJoystickDeadZone

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

Type: string

Modifiers: config

The path name for the UISkin that should be used

Default value: "UI_InGameHud.UTHUDSkin"

UISoundCueNames

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

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

UIAxisEmulationData

Extends: UIKeyRepeatData

Modifiers: native, transient

Contains parameters for emulating button presses using axis input.

bool bEnabled 
Determines whether to emulate button presses.

UIKeyRepeatData

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

Static native functions

GetDataStoreClient

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

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

static native noexportheader final function int GetPlayerCount () const

Returns the number of players currently active.

GetPlayerIndex

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

Static events

CanPlayOnline

static final event bool CanPlayOnline (int ControllerId)

Returns:

Returns whether or not the specified player can play online.

GetLoginStatus

static final event OnlineSubsystem.ELoginStatus GetLoginStatus (int ControllerId)

Returns:

Returns the current login status for the specified controller id.

GetNATType

static final event OnlineSubsystem.ENATType GetNATType ()

Wrapper for getting the NAT type

HasLinkConnection

static final event bool HasLinkConnection ()

Returns:

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

IsLoggedIn

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

Returns:

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

Other static functions

GetConnectedGamepadCount

static final function int GetConnectedGamepadCount (optional array<boolControllerConnectionStatusOverrides)

Parameters:

  • ControllerConnectionStatusOverrides - array indicating the connection status of each gamepad; should always contain MAX_SUPPORTED_GAMEPADS elements; useful when executing code as a result of a controller insertion/removal notification, as IsControllerConnected isn't reliable in that case.

Returns:

the number of gamepads which are currently connected and turned on.

GetLocalPlayer

static final function LocalPlayer GetLocalPlayer (int PlayerIndex)

Wrapper for retrieving a LocalPlayer reference for one of the players in the GamePlayers array.

Parameters:

  • PlayerIndex - the index of the player reference to retrieve.

Returns:

a reference to the LocalPlayer object at the specified index in the Engine's GamePlayers array, or None if the index isn't valid.

GetLoggedInPlayerCount

static final function int GetLoggedInPlayerCount (optional bool bRequireOnlineLogin)

Returns:

the number of players signed into the online service

GetNumGuestsLoggedIn

static final function int GetNumGuestsLoggedIn ()

Returns the number of guests logged in

IsGamepadConnected

static final function bool IsGamepadConnected (int ControllerId)

Check whether a gamepad is connected and turned on.

Parameters:

  • ControllerId - the id of the gamepad to check

Returns:

TRUE if the gamepad with the specified id is connected.

Native functions

CreateScene

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

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

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

CanAllPlayOnline

final function bool CanAllPlayOnline ()

Returns:

whether all local players can play online or not

GetLowestLoginStatusOfControllers

final function OnlineSubsystem.ELoginStatus GetLowestLoginStatusOfControllers ()

Returns:

the lowest common denominator for the login status of all local players

NotifyGameSessionEnded

function NotifyGameSessionEnded ()

Overrides: Interaction.NotifyGameSessionEnded

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

NotifyPlayerAdded

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

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

SetMousePosition

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)