My program doesn't have bugs. It just develops random features.

UE3:UTUIOptionList (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject >> UIObject >> UTUI_Widget >> UTDrawPanel >> UTUIOptionList

Contents

Package: 
UTGame
Implemented interfaces
UIDataStoreSubscriber
Direct subclasses:
UTUIKeyBindingList, UTUIDynamicOptionList
This class in other games:
UDK

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

Options tab page, autocreates a set of options widgets using the datasource provided.

Properties[edit]

Property group 'Data'[edit]

DataSource[edit]

Type: UIRoot.UIDataStoreBinding

The data store that this list is bound to

Default value:

Member Value
RequiredFieldType DATATYPE_Collection

Property group 'UTUIOptionList'[edit]

BGPrefab[edit]

Type: UIPrefab

Background prefab for the currently selected item.

Default value: UIPrefab'UI_Scenes_FrontEnd.Prefabs.OptionBG'

DefaultOptionHeight[edit]

Type: float

Properties for individual option spacing

Default value: 32.0

DefaultOptionPadding[edit]

Type: float


Default value: 12.0

DefaultOptionRightMargin[edit]

Type: float


Default value: 10.0

DefaultOptionTopMargin[edit]

Type: float


Default value: -3.0

Internal variables[edit]

ArrowColor[edit]

Type: Object.Color


Default value:

Member Value
A 255
B 1
G 0
R 128

ArrowImage[edit]

Type: Texture2D


Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseC'

bAnimatingBGPrefab[edit]

Type: bool

Modifiers: transient

Whether or not we are currently animating the background prefab.

bDownArrowPressed[edit]

Type: bool

Modifiers: transient


bDragging[edit]

Type: bool

Modifiers: transient


BGPrefabInstance[edit]

Type: UIPrefabInstance

Modifiers: transient

Instance of the background prefab.

bRegenOptions[edit]

Type: bool

Modifiers: transient

Flag to let the optionlist know that it should regenerate its options on next tick.

bUpArrowPressed[edit]

Type: bool

Modifiers: transient


CurrentIndex[edit]

Type: int

Modifiers: transient

Current option index.

DataProvider[edit]

Type: UIListElementProvider

Modifiers: const, transient

the list element provider referenced by DataSource

DownArrowBounds[edit]

Type: float

Array size: 4

Modifiers: transient


DragClickPosition[edit]

Type: Object.Vector

Modifiers: transient

Last time we changed the current selection due to dragging.

DragDeadZone[edit]

Type: float

Modifiers: transient

Current state of the arrows.

GeneratedObjects[edit]

Type: array<GeneratedObjectInfo>

Modifiers: transient

List of auto-generated objects, anything in this array will be removed from the children's array before presave.

LastDragSelection[edit]

Type: float

Modifiers: transient

Speed to increase or decrease the currently selected element when dragging, in seconds.

MaxVisibleItems[edit]

Type: int

Modifiers: transient

Maximum number of visible items.

PreviousIndex[edit]

Type: int

Modifiers: transient

Previously selected option index.

ScrollArrowWidth[edit]

Type: float

Properties for the scroll arrows.

Default value: 0.04

SelectionImage[edit]

Type: Texture2D


Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseD'

SelectionSpeed[edit]

Type: float

Modifiers: transient


StartMovementTime[edit]

Type: float

Modifiers: transient

Start time for animating option switches.

UpArrowBounds[edit]

Type: float

Array size: 4

Modifiers: transient


VerticalScrollbar[edit]

Type: UIScrollbar

Modifiers: transient

Scrollbar to let PC users scroll up and down the list freely.

Default values[edit]

Property Value
bRequiresTick True
DefaultStates[3] Class'Engine.UIState_Active'

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UTDrawPanel.WidgetEventComponent

No new values.

Structs[edit]

GeneratedObjectInfo[edit]

Modifiers: native

Info about an option we have generated.

name OptionProviderName 
UIObject LabelObj 
UIObject OptionObj 
UIDataProvider OptionProvider 
float OptionY 
float OptionHeight 
float OptionX 
float OptionWidth 

Delegates[edit]

OnAcceptOptions[edit]

delegate OnAcceptOptions (UIScreenObject InObject, int PlayerIndex)

Accept button was pressed on the option list.

OnOptionChanged[edit]

delegate OnOptionChanged (UIScreenObject InObject, name OptionName, int PlayerIndex)

Delegate for when the user changes one of the options in this option list.

OnOptionFocused[edit]

delegate OnOptionFocused (UIScreenObject InObject, UIDataProvider OptionProvider)

Delegate called when an option gains focus.

Functions[edit]

Native functions[edit]

ClearBoundDataStores[edit]

native final virtual function ClearBoundDataStores ()

Specified by: UIDataStoreSubscriber.ClearBoundDataStores

Notifies this subscriber to unbind itself from all bound data stores

GetBoundDataStores[edit]

native final virtual 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 - optional parameter for indicating which data store binding is being requested for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0.

Returns:

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

InitializeComboboxWidgets[edit]

native function InitializeComboboxWidgets ()

Initializes combobox widgets.

InitializeScrollbars[edit]

native function InitializeScrollbars ()

Initializes the scrollbar widget for the option list.

NotifyDataStoreValueUpdated[edit]

native 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.

Returns:

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

RegenerateOptions[edit]

native function RegenerateOptions ()

Generates widgets for all of the options.

RepositionOptions[edit]

native function RepositionOptions ()

Repositions all of the visible options.

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 - optional parameter for indicating which data store binding is being requested for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0.

SetSelectedOptionIndex[edit]

native function SetSelectedOptionIndex (int OptionIdx)

Sets the currently selected option index.

Events[edit]

DrawPanel[edit]

event DrawPanel ()

Overrides: UTDrawPanel.DrawPanel

Render's the list's selection elements.

GetSupportedUIActionKeyNames[edit]

event GetSupportedUIActionKeyNames (out array<nameout_KeyNames)

Overrides: UIScreenObject.GetSupportedUIActionKeyNames

Allow Script to add UI Actions

PostInitialize[edit]

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

Post initialize, binds callbacks for all of the generated options.

SetupOptionBindings[edit]

event SetupOptionBindings ()

Sets up the option bindings.

Other instance functions[edit]

CheckAndUpdateDragging[edit]

function CheckAndUpdateDragging ()

If we are dragging, this function will increment the current selection based on the location of the mouse cursor.

CheckArrowInput[edit]

function CheckArrowInput (const UIRoot.SubscribedInputEventParameters EventParms)

Checks to see if the user has clicked on the scroll arrows.

ClickedScrollZone[edit]

function ClickedScrollZone (UIScrollbar Sender, float PositionPerc, int PlayerIndex)

Handler for the vertical scrollbar's OnClickedScrollZone delegate. Scrolls the list by a full page (MaxVisibleItems).

Parameters:

  • Sender - the scrollbar that was clicked.
  • PositionPerc - a value from 0.0 - 1.0, representing the location of the click within the region between the increment and decrement buttons. Values closer to 0.0 means that the user clicked near the decrement button; values closer to 1.0 are nearer the increment button.
  • PlayerIndex - Player that performed the action that issued the event.

CursorCheck[edit]

function bool CursorCheck (float X1, float Y1, float X2, float Y2)

All are in pixels

Parameters:

  • X1 - Left
  • Y1 - Top
  • X2 - Right
  • Y2 - Bottom

Returns:

true if the mouse is within the bounds given

DrawSpecial[edit]

function DrawSpecial (float x, float y, float w, float h, float u, float v, float ul, float vl, Object.Color DrawColor, bool bOver, bool bPressed)


EnableItem[edit]

function bool EnableItem (int PlayerIndex, UIObject ChosenObj, bool bShouldEnable)

Enables / disables an item in the list. If the item is the currently selected item, selects the next item in the list, if possible.

Parameters:

  • OptionIdx - the index for the option that should be updated
  • bShouldEnable - TRUE to enable the item; FALSE to disable.

Returns:

TRUE if the item's state was successfully changed; FALSE if it couldn't be changed or OptionIdx was invalid.

EnableItemAtIndex[edit]

function bool EnableItemAtIndex (int PlayerIndex, int OptionIdx, bool bShouldEnable)


GetCurrentlySelectedOption[edit]

function UIObject GetCurrentlySelectedOption ()

Returns the currently selected option object

GetMousePosition[edit]

function Object.Vector GetMousePosition ()

Returns:

the mouse position in widget space

GetObjectInfoIndexFromName[edit]

function int GetObjectInfoIndexFromName (name ProviderName)

Returns:

Returns the object info struct index given a provider namename.

GetObjectInfoIndexFromObject[edit]

function int GetObjectInfoIndexFromObject (UIObject Sender)

Returns:

Returns the object info struct given a sender object.

OnOption_NotifyActiveStateChanged[edit]

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

Callback for when the object's active state changes.

OnValueChanged[edit]

function OnValueChanged (UIObject Sender, int PlayerIndex)

Overrides: UIObject.OnValueChanged

Callback for all of the options we generated.

ProcessInputAxis[edit]

function bool ProcessInputAxis (const out UIRoot.SubscribedInputEventParameters EventParms)

Enable hottracking if we are dragging

ProcessInputKey[edit]

function bool ProcessInputKey (const out UIRoot.SubscribedInputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using actual input key names (i.e. Left, Tab, etc.)

Called when an input key event is received which this widget responds to and is in the correct state to process. The keys and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called BEFORE kismet is given a chance to process the input.

Parameters:

  • EventParms - information about the input event.

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

RefreshAllOptions[edit]

function RefreshAllOptions ()

Refreshes the value of all of the options by having them pull their options from the datastore again.

ScrollVertical[edit]

function bool ScrollVertical (UIScrollbar Sender, float PositionChange, optional bool bPositionMaxed)

Handler for vertical scrolling activity PositionChange should be a number of nudge values by which the slider was moved

Parameters:

  • Sender - the scrollbar that generated the event.
  • PositionChange - indicates how many items to scroll the list by
  • bPositionMaxed - indicates that the scrollbar's marker has reached its farthest available position, unused in this function

SelectItem[edit]

function bool SelectItem (int OptionIdx, optional int PlayerIndex, optional bool bClampValue)

Selects the specified option item.

SelectNextItem[edit]

function bool SelectNextItem (optional bool bWrap, optional int PlayerIndex)

Selects the next item in the list.

SelectPreviousItem[edit]

function bool SelectPreviousItem (optional bool bWrap, optional int PlayerIndex)

Selects the previous item in the list.