Always snap to grid

UE3:UTUIOptionList (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:24, 17 January 2010 by (Talk)

Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIObject >> UTUI_Widget >> UTDrawPanel >> UTUIOptionList

Contents

Package: 
UTGame
Implemented interfaces
UIDataStoreSubscriber
This class in other games:
UT3

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

Properties

Property group 'Data'

DataSource

Type: UIRoot.UIDataStoreBinding

The data store that this list is bound to

Default value:

Member Value
RequiredFieldType DATATYPE_Collection

Property group 'UTUIOptionList'

BGPrefab

Type: UIPrefab

Background prefab for the currently selected item.

Default value: UIPrefab'UI_Scenes_FrontEnd.Prefabs.OptionBG'

Internal variables

ArrowColor

Type: Object.Color


Default value:

Member Value
A 255
B 1
G 0
R 128

ArrowImage

Type: Texture2D


Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseC'

bAnimatingBGPrefab

Type: bool

Modifiers: transient

Whether or not we are currently animating the background prefab.

bDownArrowPressed

Type: bool

Modifiers: transient


bDragging

Type: bool

Modifiers: transient


BGPrefabInstance

Type: UIPrefabInstance

Modifiers: transient

Instance of the background prefab.

bRegenOptions

Type: bool

Modifiers: transient

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

bUpArrowPressed

Type: bool

Modifiers: transient


CurrentIndex

Type: int

Modifiers: transient

Current option index.

DataProvider

Type: UIListElementProvider

Modifiers: const, transient

the list element provider referenced by DataSource

DownArrowBounds

Type: float

Array size: 4

Modifiers: transient


DragClickPosition

Type: Object.Vector

Modifiers: transient

Last time we changed the current selection due to dragging.

DragDeadZone

Type: float

Modifiers: transient

Current state of the arrows.

GeneratedObjects

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

Type: float

Modifiers: transient

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

MaxVisibleItems

Type: int

Modifiers: transient

Maximum number of visible items.

PreviousIndex

Type: int

Modifiers: transient

Previously selected option index.

ScrollArrowWidth

Type: float

Properties for the scroll arrows.

Default value: 0.04

SelectionImage

Type: Texture2D


Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseD'

SelectionSpeed

Type: float

Modifiers: transient


StartMovementTime

Type: float

Modifiers: transient

Start time for animating option switches.

UpArrowBounds

Type: float

Array size: 4

Modifiers: transient


VerticalScrollbar

Type: UIScrollbar

Modifiers: transient

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

Default values

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

Subobjects

WidgetEventComponent

Class: Engine.UIComp_Event

Inherits from: UTDrawPanel.WidgetEventComponent

No new values.

Structs

GeneratedObjectInfo

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

OnAcceptOptions

delegate OnAcceptOptions (UIScreenObject InObject, int PlayerIndex)

Accept button was pressed on the option list.

OnOptionChanged

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

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

OnOptionFocused

delegate OnOptionFocused (UIScreenObject InObject, UIDataProvider OptionProvider)

Delegate called when an option gains focus.

Functions

Native functions

ClearBoundDataStores

native final virtual function ClearBoundDataStores ()

Specified by: UIDataStoreSubscriber.ClearBoundDataStores

Notifies this subscriber to unbind itself from all bound data stores

GetBoundDataStores

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

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

native function InitializeComboboxWidgets ()

Initializes combobox widgets.

InitializeScrollbars

native function InitializeScrollbars ()

Initializes the scrollbar widget for the option list.

NotifyDataStoreValueUpdated

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

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

native function RegenerateOptions ()

Generates widgets for all of the options.

RepositionOptions

native function RepositionOptions ()

Repositions all of the visible options.

SetDataStoreBinding

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

native function SetSelectedOptionIndex (int OptionIdx)

Sets the currently selected option index.

Events

DrawPanel

event DrawPanel ()

Overrides: UTDrawPanel.DrawPanel

Render's the list's selection elements.

GetSupportedUIActionKeyNames

event GetSupportedUIActionKeyNames (out array<nameout_KeyNames)

Overrides: UIScreenObject.GetSupportedUIActionKeyNames

Allow Script to add UI Actions

PostInitialize

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

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

SetupOptionBindings

event SetupOptionBindings ()

Sets up the option bindings.

Other instance functions

CheckAndUpdateDragging

function CheckAndUpdateDragging ()

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

CheckArrowInput

function CheckArrowInput (const UIRoot.SubscribedInputEventParameters EventParms)

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

ClickedScrollZone

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

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

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

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

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


GetCurrentlySelectedOption

function UIObject GetCurrentlySelectedOption ()

Returns the currently selected option object

GetMousePosition

function Object.Vector GetMousePosition ()

Returns:

the mouse position in widget space

GetObjectInfoIndexFromName

function int GetObjectInfoIndexFromName (name ProviderName)

Returns:

Returns the object info struct index given a provider namename.

GetObjectInfoIndexFromObject

function int GetObjectInfoIndexFromObject (UIObject Sender)

Returns:

Returns the object info struct given a sender object.

OnOption_NotifyActiveStateChanged

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

Callback for when the object's active state changes.

OnValueChanged

function OnValueChanged (UIObject Sender, int PlayerIndex)

Overrides: UIObject.OnValueChanged

Callback for all of the options we generated.

ProcessInputAxis

function bool ProcessInputAxis (const out UIRoot.SubscribedInputEventParameters EventParms)

Enable hottracking if we are dragging

ProcessInputKey

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

function RefreshAllOptions ()

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

ScrollVertical

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

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

Selects the specified option item.

SelectNextItem

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

Selects the next item in the list.

SelectPreviousItem

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

Selects the previous item in the list.