|
|
Line 1: |
Line 1: |
| {{infobox class | | {{UE3:UIState (UT3)}} |
| | package = Engine
| |
| | parent1 = UIRoot
| |
| | parent2 = Object
| |
| | interface1 = UIEventContainer
| |
| | abstract = yes
| |
| }}
| |
| {{autogenerated}}
| |
| 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.
| |
| | |
| ==Properties==
| |
| ===Property group 'UIState'===
| |
| ====MouseCursorName====
| |
| '''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===
| |
| ====DisabledInputActions====
| |
| '''Type:''' [[array]]<{{tl|InputKeyAction|UIRoot|structs}}>
| |
| | |
| 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====
| |
| '''Type:''' [[byte]]
| |
| | |
| '''[[Variables#Modifiers|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====
| |
| '''Type:''' [[byte]]
| |
| | |
| '''[[Variables#Modifiers|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====
| |
| '''Type:''' [[array]]<{{tl|InputKeyAction|UIRoot|structs}}>
| |
| | |
| 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====
| |
| '''Type:''' {{cl|UIStateSequence}}
| |
| | |
| '''[[Variables#Modifiers|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==
| |
| ===Native functions===
| |
| ====AddSequenceObject====
| |
| {{code|native final function [[bool]] '''AddSequenceObject''' ({{cl|SequenceObject}} '''NewObj''', optional [[bool]] '''bRecurse''')}}
| |
| | |
| '''Specified by:''' {{tl|AddSequenceObject|UIEventContainer}}
| |
| | |
| 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====
| |
| {{code|native final function '''GetUIEvents''' (out [[array]]<{{cl|UIEvent}}> '''out_Events''', optional [[class]]<{{cl|UIEvent}}> '''LimitClass''')}}
| |
| | |
| '''Specified by:''' {{tl|GetUIEvents|UIEventContainer}}
| |
| | |
| 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====
| |
| {{code|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====
| |
| {{code|native final function '''RemoveSequenceObject''' ({{cl|SequenceObject}} '''ObjectToRemove''')}}
| |
| | |
| '''Specified by:''' {{tl|RemoveSequenceObject|UIEventContainer}}
| |
| | |
| Removes the specified SequenceObject from this container's list of ops.
| |
| | |
| '''Parameters:'''
| |
| * ''ObjectToRemove'' - the sequence object to remove
| |
| | |
| ====RemoveSequenceObjects====
| |
| {{code|native final function '''RemoveSequenceObjects''' (const out [[array]]<{{cl|SequenceObject}}> '''ObjectsToRemove''')}}
| |
| | |
| '''Specified by:''' {{tl|RemoveSequenceObjects|UIEventContainer}}
| |
| | |
| Removes the specified SequenceObjects from this container's list of ops.
| |
| | |
| '''Parameters:'''
| |
| * ''ObjectsToRemove'' - the objects to remove from this sequence
| |
| | |
| ===Events===
| |
| ====ActivateState====
| |
| {{code|event [[bool]] '''ActivateState''' ({{cl|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====
| |
| {{code|event [[bool]] '''DeactivateState''' ({{cl|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====
| |
| {{code|event [[bool]] '''IsStateAllowed''' ({{cl|UIScreenObject}} '''Target''', {{cl|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====
| |
| {{code|event [[bool]] '''IsWidgetClassSupported''' ([[class]]<{{cl|UIScreenObject}}> '''WidgetClass''')}}
| |
| | |
| <!-- enter event description -->
| |
| | |
| ====OnActivate====
| |
| {{code|event '''OnActivate''' ({{cl|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====
| |
| {{code|event '''OnDeactivate''' ({{cl|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)
| |
- Package:
- Engine
- Implemented interfaces:
- UIEventContainer
- Direct subclasses:
- UIState_Active, UIState_Disabled, UIState_Enabled, UIState_Focused, UIState_Pressed, UIState_TargetedTab
- This class in other games:
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
Property group 'UIState'
MouseCursorName
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
DisabledInputActions
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
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
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
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
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
Native functions
AddSequenceObject
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
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
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
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
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
ActivateState
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
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
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
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
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
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)