Mostly Harmless

UE3:UIComboBox (UDK)

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

A complex widget which contains a list, a button for toggling the visibility of the list, and an editbox for displaying the currently selected item when the list is not visible. Also supports rendering a caption to left, right, above, or below the editbox.

Constants[edit]

TEXT_CHANGED_NOTIFY_MASK[edit]

Value: 0x1


INDEX_CHANGED_NOTIFY_MASK[edit]

Value: 0x2


COMBO_CAPTION_DATABINDING_INDEX[edit]

Value: 1


Properties[edit]

Property group 'Appearance'[edit]

bDockListToButton[edit]

Type: bool

Modifiers: private

Controls whether the list is docked to the combobox itself or the inside face of the button.

Property group 'Components'[edit]

BackgroundRenderComponent[edit]

Type: UIComp_DrawImage

Modifiers: editinline, const

Optional component for rendering a background image for this combo box. No value given by default.

CaptionRenderComponent[edit]

Type: UIComp_DrawCaption

Modifiers: editinline, const

Optional component for rendering a caption next to the editbox. No value given by default.

Property group 'Controls'[edit]

ComboButton[edit]

Type: UIToggleButton

Modifiers: editinline, const, noclear

Used to toggle the visibility of the list

Todo: need script accessors for safely replacing the button with a new type, since the var is const

ComboEditbox[edit]

Type: UIEditBox

Modifiers: editinline, const, noclear

Used to display the currently selected value

Todo: need script accessors for safely replacing the editbox with a new type, since the var is const

ComboList[edit]

Type: UIList

Modifiers: editinline, const, noclear

Contains the collection of available choices for this combo box

Todo: need script accessors for safely replacing the list with a new type, since the var is const

Property group 'Data'[edit]

CaptionDataSource[edit]

Type: UIRoot.UIDataStoreBinding

Modifiers: editconst, const, private

The data source this this combo box's caption will link to, if applicable.

Property group 'Sound'[edit]

DecrementCue[edit]

Type: name

This sound is played when the combo's list is hidden It will be played at the same time as the combobox button's clicked sound, so it's recommended to clear any sound cues assign to the combo box button's ClickedCue.

OpenList[edit]

Type: name

This sound is played when the list is made visible. It will be played at the same time as the combobox button's clicked sound, so it's recommended to clear any sound cues assign to the combo box button's ClickedCue.

Internal variables[edit]

ComboButtonClass[edit]

Type: class<UIToggleButton>

Modifiers: const

The class to use for creating the combo box's button. If more control of the creation is necessary, or to use an existing button, subscribe to the CreateCustomComboButton delegate instead.

Default value: Class'Engine.UIToggleButton'

ComboEditboxClass[edit]

Type: class<UIEditBox>

Modifiers: const

The class to use for creating the combo box's editbox. If more control of the creation is necessary, or to use an existing editbox, subscribe to the CreateCustomComboEditbox delegate instead.

Default value: Class'Engine.UIEditBox'

ComboListClass[edit]

Type: class<UIList>

Modifiers: const

The class to use for creating the combo box's list. If more control of the creation is necessary, or to use an existing list, subscribe to the CreateCustomComboList delegate instead.

Default value: Class'Engine.UIList'

Default values[edit]

Property Value
bSupportsPrimaryStyle False
DefaultStates[2] Class'Engine.UIState_Active'
DefaultStates[3] Class'Engine.UIState_Focused'
DefaultStates[4] Class'Engine.UIState_Pressed'
Position
Member Value
ScaleType[2] EVALPOS_PixelOwner
ScaleType[3] EVALPOS_PixelOwner
Value[2] 256.0
Value[3] 32.0
PrivateFlags 1024

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UIObject.WidgetEventComponent

No new values.

Delegates[edit]

CreateCustomComboButton[edit]

delegate UIToggleButton CreateCustomComboButton (UIComboBox ButtonOwner)


CreateCustomComboEditbox[edit]

delegate UIEditBox CreateCustomComboEditbox (UIComboBox EditboxOwner)

Provides a convenient way to override the creation of the combo's components. Called when this UIComboBox is first initialized.

Returns:

if a custom component is desired, a pointer to a fully configured instance of the desired component class. You must use UIScreenObject.CreateWidget to create the widget instances. The returned instance will be inserted into the combo box's Children array and initialized.

CreateCustomComboList[edit]

delegate UIList CreateCustomComboList (UIComboBox ListOwner)


Functions[edit]

Native functions[edit]

ClearBoundDataStores[edit]

native function ClearBoundDataStores ()

Specified by: UIDataStoreSubscriber.ClearBoundDataStores

Notifies this subscriber to unbind itself from all bound data stores

GetBoundDataStores[edit]

native function GetBoundDataStores (out array<UIDataStoreout_BoundDataStores)

Specified by: UIDataStoreSubscriber.GetBoundDataStores

Retrieves the list of data stores bound by this subscriber.

Parameters:

  • out_BoundDataStores - receives the array of data stores that subscriber is bound to.

GetDataStoreBinding[edit]

native final virtual function string GetDataStoreBinding (optional int BindingIndex) const

Specified by: UIDataStoreSubscriber.GetDataStoreBinding

Retrieves the markup string corresponding to the data store that this object is bound to.

Parameters:

  • BindingIndex - indicates which data store binding should be modified. Valid values and their meanings are: 0: list data source 1: caption data source

Returns:

a datastore markup string which resolves to the datastore field that this object is bound to, in the format: <DataStoreTag:DataFieldTag>

NotifyDataStoreValueUpdated[edit]

native final virtual function NotifyDataStoreValueUpdated (UIDataStore SourceDataStore, bool bValuesInvalidated, name PropertyTag, UIDataProvider SourceProvider, int ArrayIndex)

Specified by: UIDataStoreSubscriber.NotifyDataStoreValueUpdated

Handler for the UIDataStore.OnDataStoreValueUpdated delegate. Used by data stores to indicate that some data provided by the data has changed. Subscribers should use this function to refresh any data store values being displayed with the updated value. notify subscribers when they should refresh their values from this data store.

Parameters:

  • SourceDataStore - the data store that generated the refresh notification; useful for subscribers with multiple data store bindings, to tell which data store sent the notification.
  • PropertyTag - the tag associated with the data field that was updated; Subscribers can use this tag to determine whether there is any need to refresh their data values.
  • SourceProvider - for data stores which contain nested providers, the provider that contains the data which changed.
  • ArrayIndex - for collection fields, indicates which element was changed. value of INDEX_NONE indicates not an array or that the entire array was updated.

RefreshSubscriberValue[edit]

native final virtual function bool RefreshSubscriberValue (optional int BindingIndex)

Specified by: UIDataStoreSubscriber.RefreshSubscriberValue

Resolves this subscriber's data store binding and updates the subscriber with the current value from the data store.

Parameters:

  • BindingIndex - indicates which data store binding should be modified. Valid values and their meanings are: -1: all data sources 0: list data source 1: caption data source

Returns:

TRUE if this subscriber successfully resolved and applied the updated value.

SaveSubscriberValue[edit]

native function bool SaveSubscriberValue (out array<UIDataStoreout_BoundDataStores, optional int BindingIndex)

Specified by: UIDataStorePublisher.SaveSubscriberValue

Resolves this subscriber's data store binding and publishes this subscriber's value to the appropriate data store.

Parameters:

  • out_BoundDataStores - contains the array of data stores that widgets have saved values to. Each widget that implements this method should add its resolved data store to this array after data values have been published. Once SaveSubscriberValue has been called on all widgets in a scene, OnCommit will be called on all data stores in this array.
  • BindingIndex - indicates which data store binding should be modified. Valid values and their meanings are: -1: all data sources 0: list data source 1: caption data source

Returns:

TRUE if the value was successfully published to the data store.

SetDataStoreBinding[edit]

native final virtual function SetDataStoreBinding (string MarkupText, optional int BindingIndex)

Specified by: UIDataStoreSubscriber.SetDataStoreBinding

Sets the data store binding for this object to the text specified.

Parameters:

  • MarkupText - a markup string which resolves to data exposed by a data store. The expected format is: <DataStoreTag:DataFieldTag>
  • BindingIndex - indicates which data store binding should be modified. Valid values and their meanings are: 0: list data source 1: caption data source

Events[edit]

HideList[edit]

event HideList (optional int PlayerIndex)


PostInitialize[edit]

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

Propagate the enabled state of this widget.

SetVisibility[edit]

event SetVisibility (bool bIsVisible)

Overrides: UIScreenObject.SetVisibility

Changes whether this widget is visible or not. Should be overridden in child classes to perform additional logic or abort the visibility change.

Parameters:

  • bIsVisible - TRUE if the widget should be visible; false if not.

ShowList[edit]

event ShowList (optional int PlayerIndex)


Other instance functions[edit]

ButtonPressed[edit]

function ButtonPressed (UIScreenObject EventObject, int PlayerIndex)

Handler for the button's OnPressed delegate

Parameters:

  • EventObject - Object that issued the event.
  • PlayerIndex - Player that performed the action that issued the event.

EditboxPressed[edit]

function EditboxPressed (UIScreenObject EventObject, int PlayerIndex)

Handler for the editbox's OnPress delegate.

Parameters:

  • EventObject - Object that issued the event.
  • PlayerIndex - Player that performed the action that issued the event.

EditboxTextChanged[edit]

function EditboxTextChanged (UIObject Sender, int PlayerIndex)

Handler for the editbox's OnValueChanged delegate. Called when the user types text into the editbox.

Parameters:

  • Sender - the UIObject whose value changed
  • PlayerIndex - the index of the player that generated the call to this method; used as the PlayerIndex when activating UIEvents; if not specified, the value of GetBestPlayerIndex() is used instead.

IsListDockedToButton[edit]

final function bool IsListDockedToButton ()

Retrieves the value of bDockListToButton.

ListItemSelected[edit]

function ListItemSelected (UIList Sender, optional int PlayerIndex)

Called when the user presses Enter (or any other action bound to UIKey_SubmitListSelection) while this list has focus.

Parameters:

  • Sender - the list that is submitting the selection

SelectedItemChanged[edit]

function SelectedItemChanged (UIObject Sender, int PlayerIndex)

Handler for the list's OnValueChanged delegate. Called when the list's index changes.

Parameters:

  • Sender - the UIObject whose value changed
  • PlayerIndex - the index of the player that generated the call to this method; used as the PlayerIndex when activating UIEvents; if not specified, the value of GetBestPlayerIndex() is used instead.

SetEditboxText[edit]

function SetEditboxText (string NewText, int PlayerIndex, optional bool bListItemsOnly, optional bool bSkipNotification)

Changes the editbox's text to the string specified.

Parameters:

  • NewText - the text to apply to the editbox
  • PlayerIndex - Player that performed the action that issued the event.
  • bListItemsOnly - if TRUE, will only apply the specified text if matches an existing element in the list
  • bSkipNotification - specify TRUE to prevent the OnValueChanged delegate from being called.

SetListDocking[edit]

function SetListDocking (bool bDockToButton)

Changes the value of bDockListToButton to the specified value.

ShowListClickHandler[edit]

function bool ShowListClickHandler (UIScreenObject EventObject, int PlayerIndex)

Handler for the button and editbox's OnClicked delegate; Used to show the combobox list.

Parameters:

  • EventObject - Object that issued the event.
  • PlayerIndex - Player that performed the action that issued the event.

Returns:

return TRUE to prevent the kismet OnClick event from firing.