Always snap to grid

UE3:UIEvent (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> SequenceObject >> SequenceOp >> SequenceEvent >> UIEvent
Package: 
Engine
Direct subclasses:
UIEvent_OnDoubleClick, UIEvent_Initialized, UIEvent_ProcessInput, UIEvent_SubmitData, UIEvent_MetaObject, UIEvent_OnClick, UIEvent_Scene, UIEvent_State, UIEvent_TabControl, UIEvent_ValueChanged, UTUIEvent
This class in other games:
UDK

Abstract base class for UI events. A UIEvent is some event that a widget can respond to. It could be an input event such as a button press, or a system event such as receiving data from a remote system. UIEvents are generally not bound to a particular type of widget; programmers choose which events are available to widgets, and artists decide which events to implement.

Features: Able to execute multiple actions when the event is called. Able to operate on multiple widgets simultaneously.

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

Properties[edit]

bPropagateEvent[edit]

Type: bool

Indicates whether this activation of this event type should be propagated up the parent chain.

Default value: True

bShouldRegisterEvent[edit]

Type: bool

Indicates whether this event should be added to widget sequences. Used for special-case handling of certain types of events.

Default value: True

Description[edit]

Type: string

Modifiers: localized

a short description of what this event does - displayed as a tooltip in the editor when the user hovers over this event in the editor

EventActivator[edit]

Type: Object

the object that initiated this event; specific to each event

EventOwner[edit]

Type: UIScreenObject

Modifiers: noimport

the widget that contains this event

Default values[edit]

Property Value
bClientSideOnly True
MaxTriggerCount 0
ObjCategory "UI"
ObjClassVersion 2
VariableLinks[0]
Member Value
LinkDesc "Activator"
VariableLinks[1]
Member Value
bHidden True
bWriteable True
ExpectedType Class'Engine.SeqVar_Int'
LinkDesc "Player Index"
MaxVars 255
MinVars 1
VariableLinks[2]
Member Value
bHidden True
bWriteable True
ExpectedType Class'Engine.SeqVar_Int'
LinkDesc "Gamepad Id"
MaxVars 255
MinVars 1

Delegates[edit]

AllowEventActivation[edit]

delegate bool AllowEventActivation (int ControllerIndex, UIScreenObject InEventOwner, Object InEventActivator, bool bActivateImmediately, out const array<intIndicesToActivate)

Allows script-only child classes or other objects to include additional logic for determining whether this event is eligible for activation.

Parameters:

  • ControllerIndex - the index of the player that activated this event
  • InEventOwner - the widget that owns this UIEvent
  • InEventActivator - an optional object that can be used for various purposes in UIEvents; typically the widget that triggered the event activation.
  • bActivateImmediately - TRUE if the caller wishes to perform immediate activation.
  • IndicesToActivate - indexes of the elements [into the Output array] that are going to be activated. If empty, all output links will be activated

Returns:

TRUE if this event can be activated

Functions[edit]

Native functions[edit]

ActivateUIEvent[edit]

native final noexport function bool ActivateUIEvent (int ControllerIndex, UIScreenObject InEventOwner, optional Object InEventActivator, optional bool bActivateImmediately, optional out const array<intIndicesToActivate)

Activates this UIEvent, adding it the list of active sequence operations in the owning widget's EventProvider

Parameters:

  • ControllerIndex - the index of the player that activated this event
  • InEventOwner - the widget that contains this UIEvent
  • InEventActivator - an optional object that can be used for various purposes in UIEvents
  • bActivateImmediately - if TRUE, the event will be activated immediately, rather than deferring activation until the next tick
  • IndicesToActivate - Indexes into this UIEvent's Output array to activate. If not specified, all output links will be activated

Returns:

TRUE if this event was successfully activated

Note: noexport so that the native function header can take a TArray<INT> pointer as the last parameter

CanBeActivated[edit]

native final noexport function bool CanBeActivated (int ControllerIndex, UIScreenObject InEventOwner, optional Object InEventActivator, optional bool bActivateImmediately, optional out const array<intIndicesToActivate)

Determines whether this UIAction can be activated.

Parameters:

  • ControllerIndex - the index of the player that activated this event
  • InEventOwner - the widget that contains this UIEvent
  • InEventActivator - an optional object that can be used for various purposes in UIEvents
  • bActivateImmediately - specify true to indicate that we'd like to know whether this event can be activated immediately
  • IndicesToActivate - Indexes into this UIEvent's Output array to activate. If not specified, all output links will be activated

Returns:

TRUE if this event can be activated

Note: noexport so that the native function header can take a TArray<INT> pointer as the last parameter

ConditionalActivateUIEvent[edit]

native final noexport function bool ConditionalActivateUIEvent (int ControllerIndex, UIScreenObject InEventOwner, optional Object InEventActivator, optional bool bActivateImmediately, optional out const array<intIndicesToActivate)

Activates this event if CanBeActivated returns TRUE.

Parameters:

  • ControllerIndex - the index of the player that activated this event
  • InEventOwner - the widget that contains this UIEvent
  • InEventActivator - an optional object that can be used for various purposes in UIEvents
  • bActivateImmediately - if TRUE, the event will be activated immediately, rather than deferring activation until the next tick
  • IndicesToActivate - Indexes into this UIEvent's Output array to activate. If not specified, all output links will be activated

Returns:

TRUE if this event was successfully activated

Note: noexport so that the native function header can take a TArray<INT> pointer as the last parameter

GetOwner[edit]

native final function UIScreenObject GetOwner () const

Returns the widget that contains this UIEvent.

GetOwnerScene[edit]

native final function UIScene GetOwnerScene () const

Returns the scene that contains this UIEvent.

Events[edit]

IsValidLevelSequenceObject[edit]

event bool IsValidLevelSequenceObject ()

Overrides: SequenceObject.IsValidLevelSequenceObject

Determines whether this class should be displayed in the list of available ops in the level kismet editor.

Returns:

TRUE if this sequence object should be available for use in the level kismet editor

IsValidUISequenceObject[edit]

event bool IsValidUISequenceObject (optional UIScreenObject TargetObject)

Overrides: SequenceObject.IsValidUISequenceObject

Determines whether this class should be displayed in the list of available ops in the UI's kismet editor.

Parameters:

  • TargetObject - the widget that this SequenceObject would be attached to.

Returns:

TRUE if this sequence object should be available for use in the UI kismet editor

ShouldAlwaysInstance[edit]

event bool ShouldAlwaysInstance ()

Allows events to override the default behavior of not instancing event templates during the game (@see UIComp_Event::InstanceEventTemplates); by default, events templates declared in widget defaultproperties are only instanced if the template definition contains linked ops. If your event class performs some other actions which affect the game when it's activated, you can use this function to force the UI to instance this event for widgets created at runtime in the game.

Returns:

return TRUE to force the UI to always instance event templates of this event type, even if there are no linked ops.