I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:UIState (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIState
Package: 
Engine
Implemented interfaces
UIEventContainer
Direct subclasses:
UIState_Active, UIState_Disabled, UIState_Enabled, UIState_Focused, UIState_Pressed, UIState_TargetedTab
This class in other games:
UDK

Modifies the behavior, appearance, available events, or actions for a single widget. Every widget has at last two UIStates - enabled and disabled, but can have as many as necessary. Other common widget states might be focused, active, pressed, dragging (i.e. drag-n-drop), or selected.

Examples of things a UIState may do include replacing the widget's image or changing the appearance of the widget in some other fashion, such as brightening, adding a bevel, etc.

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

Properties[edit]

Property group 'UIState'[edit]

MouseCursorName[edit]

Type: name

Allows UIStates to specify a particular mouse cursor that should be used while this state is active. Can be overridden by the widget that owns this UIState, and must correspond to a cursor resource name from the active skin's MouseCursorMap.

Default value: 'Arrow'

Internal variables[edit]

DisabledInputActions[edit]

Type: array<UIRoot.InputKeyAction>

Contains the input keys that the designer wants to remove from this state's supported input keys. Only those input actions which are generated from a default input action [declared in a widget class's default properties] need to be in this array. Required to prevent the code that instances default input key actions that were added by the programmer after the designer placed this widget from re-instancing input keys that the designer has removed from this state's list of supported input keys.

PlayerIndexMask[edit]

Type: byte

Modifiers: transient

A bitmask representing the indexes [into the Engine.GamePlayers array] that this state has been activated for. The value is generated by left bitshifting by the index of the player. A value of 1 << 1 indicates that this state was activated by the player at index 1. So value of 3 means that this state is active for the players at indexes 0 and 1.

StackPriority[edit]

Type: byte

Modifiers: transient, const

Controls where the state will be inserted into the owning widget's StateStack array. States with a higher value will always be inserted after states with a lower value.

StateInputActions[edit]

Type: array<UIRoot.InputKeyAction>

The list of input keys (and their associated actions) to activate when this state becomes active. When the state becomes active, any input actions in this list will be added to the widget's input processing event. If the widget does not have a input processing event, one is automatically created. When this state is deactivated, the input actions in this list are removed from the widget's event processor.

StateSequence[edit]

Type: UIStateSequence

Modifiers: instanced, noimport

Contains the events, actions, and variables that are only available while this state is active.

Marked noimport because UUISceneFactoryText uses accessor functions to create the creates sequences for pasted objects, so we don't want to overwrite the value of the pasted widget's StateSequence with the value from the paste text.

Functions[edit]

Native functions[edit]

AddSequenceObject[edit]

native final function bool AddSequenceObject (SequenceObject NewObj, optional bool bRecurse)

Specified by: UIEventContainer.AddSequenceObject

Adds a new SequenceObject to this containers's list of ops

Parameters:

  • NewObj - the sequence object to add.
  • bRecurse - if TRUE, recursively add any sequence objects attached to this one

Returns:

TRUE if the object was successfully added to the sequence.

GetUIEvents[edit]

native final function GetUIEvents (out array<UIEventout_Events, optional class<UIEventLimitClass)

Specified by: UIEventContainer.GetUIEvents

Retrieves the UIEvents contained by this container.

Parameters:

  • out_Events - will be filled with the UIEvent instances stored in by this container
  • LimitClass - if specified, only events of the specified class (or child class) will be added to the array

IsActiveForPlayer[edit]

native final function bool IsActiveForPlayer (int PlayerIndex) const

Determines whether this state has been activated for the specified player index

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] of the player to check for

Returns:

TRUE if this state has been activated for the specified player.

RemoveSequenceObject[edit]

native final function RemoveSequenceObject (SequenceObject ObjectToRemove)

Specified by: UIEventContainer.RemoveSequenceObject

Removes the specified SequenceObject from this container's list of ops.

Parameters:

  • ObjectToRemove - the sequence object to remove

RemoveSequenceObjects[edit]

native final function RemoveSequenceObjects (const out array<SequenceObjectObjectsToRemove)

Specified by: UIEventContainer.RemoveSequenceObjects

Removes the specified SequenceObjects from this container's list of ops.

Parameters:

  • ObjectsToRemove - the objects to remove from this sequence

Events[edit]

ActivateState[edit]

event bool ActivateState (UIScreenObject Target, int PlayerIndex)

Activate this state for the specified target.

Parameters:

  • Target - the widget that is activating this state.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

Returns:

TRUE to allow this state to be activated for the specified Target.

DeactivateState[edit]

event bool DeactivateState (UIScreenObject Target, int PlayerIndex)

Deactivate this state for the specified target.

Parameters:

  • Target - the widget that is deactivating this state.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

Returns:

TRUE to allow this state to be deactivated for the specified Target.

IsStateAllowed[edit]

event bool IsStateAllowed (UIScreenObject Target, UIState NewState, int PlayerIndex)

Allows states currently in a widget's StateStack to prevent the widget from entering a new state. This function is only called for states currently in the widget's StateStack.

Parameters:

  • Target - the widget that wants to enter the new state
  • NewState - the new state that widget wants to enter
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call

Returns:

TRUE if the widget should be allowed to enter the state specified.

Fixme: splitscreen

IsWidgetClassSupported[edit]

event bool IsWidgetClassSupported (class<UIScreenObjectWidgetClass)

Determines whether this state can be used by the widget class specified. Only used in the UI editor to remove unsupported states from the various controls and menus.

OnActivate[edit]

event OnActivate (UIScreenObject Target, int PlayerIndex, bool bPushedState)

Notification that Target has made this state its active state.

Parameters:

  • Target - the widget that activated this state.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call
  • bPushedState - TRUE when this state has just been added to the owning widget's StateStack; FALSE if this state is being activated for additional players in split-screen

OnDeactivate[edit]

event OnDeactivate (UIScreenObject Target, int PlayerIndex, bool bPoppedState)

Notification that Target has just deactivated this state.

Parameters:

  • Target - the widget that deactivated this state.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that generated this call
  • bPoppedState - TRUE when this state has been removed from the owning widget's StateStack; FALSE if this state is still active for at least one player (i.e. in split-screen)