Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:UITabButton (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIObject >> UIButton >> UILabelButton >> UITabButton
Package: 
Engine
Implemented interfaces
UIDataStorePublisher
This class in other games:
UT3

This widget is used by the UITabControl. It is always associated with a UITabPage.

Properties

Property group 'UITabButton'

TabPage

Type: UITabPage

Modifiers: editconst, editinline, protected


Default values

Property Value
DefaultStates[5] Class'Engine.UIState_TargetedTab'
PrivateFlags 931

Subobjects

BackgroundImageTemplate

Class: Engine.UIComp_DrawImage

Inherits from: UILabelButton.BackgroundImageTemplate

Property Value
StyleResolverTag 'TabButtonBackgroundStyle'

LabelStringRenderer

Class: Engine.UIComp_DrawString

Inherits from: UILabelButton.LabelStringRenderer

Property Value
StyleResolverTag 'TabButtonCaptionStyle'

WidgetEventComponent

Class: Engine.UIComp_Event

Inherits from: UILabelButton.WidgetEventComponent

Property Value
DisabledEventAliases[0] 'NextControl'
DisabledEventAliases[1] 'PrevControl'
DisabledEventAliases[2] 'NavFocusUp'
DisabledEventAliases[3] 'NavFocusDown'
DisabledEventAliases[4] 'NavFocusLeft'
DisabledEventAliases[5] 'NavFocusRight'

Delegates

IsActivationAllowed

delegate bool IsActivationAllowed (UITabButton Sender, int PlayerIndex)

Callback for allowing others to override activation of this button.

Parameters:

  • Sender - the button that is being activated.
  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that wishes to activate this button.

Functions

Native functions

CanActivateButton

native final virtual function bool CanActivateButton (int PlayerIndex)

Determines whether this page can be activated. Calls the IsActivationAllowed delegate to provide other objects a chance to veto the activation of this button.

Child classes wishing to perform additional logic for determining whether this button can be activated should hook into the IsActivationAllowed delegate.

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player that wishes to activate this page.

Returns:

TRUE if this button is allowed to become the active tab button.

IsTargeted

native final noexport function bool IsTargeted (optional int PlayerIndex, optional out int StateIndex) const

Returns TRUE if this widget has a UIState_TargetedTab object in its StateStack

Parameters:

  • StateIndex - if specified, will be set to the index of the last state in the list of active states that has the class specified

Events

AddedChild

event AddedChild (UIScreenObject WidgetOwner, UIObject NewChild)

Overrides: UIScreenObject.AddedChild

Called immediately after a child has been added to this screen object.

This version assigns the TabPage reference to the new child if it's a UITabPage.

Parameters:

  • WidgetOwner - the screen object that the NewChild was added as a child for
  • NewChild - the widget that was added

RemovedChild

event RemovedChild (UIScreenObject WidgetOwner, UIObject OldChild, optional array<UIObjectExclusionSet)

Overrides: UIScreenObject.RemovedChild

Called immediately after a child has been removed from this screen object.

This version clears the TabPage reference, if the child being removed is the current tab page.

Parameters:

  • WidgetOwner - the screen object that the widget was removed from.
  • OldChild - the widget that was removed
  • ExclusionSet - used to indicate that multiple widgets are being removed in one batch; useful for preventing references between the widgets being removed from being severed. NOTE: If a value is specified, OldChild will ALWAYS be part of the ExclusionSet, since it is being removed.

RemovedFromParent

event RemovedFromParent (UIScreenObject WidgetOwner)

Overrides: UIScreenObject.RemovedFromParent

Notification that this widget's parent is about to remove this widget from its children array. Allows the widget to clean up any references to the old parent.

This version clears the tab button's OnClicked delegate.

Parameters:

  • WidgetOwner - the screen object that this widget was removed from.

Other instance functions

GetTabPage

function UITabPage GetTabPage ()

Simple accessor for getting a reference to this button's page.

OnStateChanged

function OnStateChanged (UIScreenObject Sender, int PlayerIndex, UIState NewlyActiveState, optional UIState PreviouslyActiveState)

Called when a new UIState becomes the widget's currently active state, after all activation logic has occurred.

This version ensures that the targeted state is deactivated whenever a tab button becomes focused.

Parameters:

  • Sender - the widget that changed states.
  • PlayerIndex - the index [into the GamePlayers array] for the player that activated this state.
  • NewlyActiveState - the state that is now active
  • PreviouslyActiveState - the state that used the be the widget's currently active state.