I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

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[edit]

Property group 'UITabButton'[edit]

TabPage[edit]

Type: UITabPage

Modifiers: editconst, editinline, protected


Default values[edit]

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

Subobjects[edit]

BackgroundImageTemplate[edit]

Class: Engine.UIComp_DrawImage

Inherits from: UILabelButton.BackgroundImageTemplate

Property Value
StyleResolverTag 'TabButtonBackgroundStyle'

LabelStringRenderer[edit]

Class: Engine.UIComp_DrawString

Inherits from: UILabelButton.LabelStringRenderer

Property Value
StyleResolverTag 'TabButtonCaptionStyle'

WidgetEventComponent[edit]

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[edit]

IsActivationAllowed[edit]

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[edit]

Native functions[edit]

CanActivateButton[edit]

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[edit]

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[edit]

AddedChild[edit]

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[edit]

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[edit]

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[edit]

GetTabPage[edit]

function UITabPage GetTabPage ()

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

OnStateChanged[edit]

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.