Cogito, ergo sum

UE3:UTSimpleList (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject >> UIObject >> UTUI_Widget >> UTDrawPanel >> UTSimpleList

Contents

Package: 
UTGame
Direct subclasses:
UTMapVoteList, UTSimpleMenu, UTUIMenuList
This class in other games:
UDK

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

[edit] Properties

[edit] Property group 'UTSimpleList'

[edit] AboveBelowCellHeightMultiplier

Type: float

How mucbh to multiply the above and below cells by

Default value: 1.5

[edit] AboveBelowColor

Type: Object.Color


Default value:

Member Value
A 255
B 32
G 32
R 128

[edit] ArrowColor

Type: Object.Color


Default value:

Member Value
A 255
B 1
G 0
R 128

[edit] ArrowImage

Type: Texture2D


Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseC'

[edit] bHideScrollArrows

Type: bool


Default value: True

[edit] bHorizontalList

Type: bool

Whether we are a vertical or horizontal list.

[edit] bHotTracking

Type: bool

Whether or not to hot track the current item mouse cursor.

[edit] BubbleRadius

Type: int

Size of the selection bubble, used to calculate alpha for items around the selected item.

Default value: 2

[edit] bWrapList

Type: bool

Whether or not the list should wrap.

Default value: True

[edit] DefaultCellHeight

Type: float

This is how big the normal cell of text is at 1024x768.

Default value: 23.0

[edit] List

Type: array<SimpleListData>

Modifiers: editinline

The list itself.

[edit] NormalColor

Type: Object.Color


Default value:

Member Value
A 255
B 64
G 64
R 192

[edit] NormalTextOffset

Type: Object.Vector2D


[edit] NormalTextPadding

Type: Object.Vector2D

Padding and offset percentage for a normal list item's text.

[edit] ScrollWidthRatio

Type: float

This is the ratio of Height to widget for the selection widget's box. It will be used to size the list

Default value: 1.29347

[edit] SelectedColor

Type: Object.Color


Default value:

Member Value
A 255
B 255
G 255
R 255

[edit] SelectedTextOffset

Type: Object.Vector2D


Default value:

Member Value
X 0.0
Y 0.05

[edit] SelectedTextPadding

Type: Object.Vector2D

Padding and offset percentage for a selected list item's text.

Default value:

Member Value
X 0.0
Y 0.2

[edit] Selection

Type: int

Modifiers: transient

Index of the currently selected widget

Default value: -1

[edit] SelectionBarColor

Type: Object.Color


Default value:

Member Value
A 225
B 1
G 0
R 64

[edit] SelectionCellHeightMultiplier

Type: float

How much to multiply the selected cell by

Default value: 3.25

[edit] SelectionImage

Type: Texture2D

Selection Image texture.

Default value: Texture2D'UI_HUD.HUD.UI_HUD_BaseD'

[edit] SelectionImageBarU

Type: float

Selection bar image UVs.

Default value: 340.0

[edit] SelectionImageBarUL

Type: float


Default value: 361.0

[edit] SelectionImageBarV

Type: float


[edit] SelectionImageBarVL

Type: float


Default value: 76.0

[edit] SelectionImageIconBGU

Type: float

Selection bar icon bg UVs.

Default value: 260.0

[edit] SelectionImageIconBGUL

Type: float


Default value: 80.0

[edit] SelectionImageIconBGV

Type: float


[edit] SelectionImageIconBGVL

Type: float


Default value: 76.0

[edit] ShadowColor

Type: Object.Color

Color of text drop shadow.

Default value:

Member Value
A 255
B 0
G 0
R 0

[edit] ShadowDist

Type: float

Distance of the text drop shadow.

Default value: 1.0

[edit] TextFont

Type: Font

The font to use for rendering

Default value: MultiFont'UI_Fonts_Final.Menus.Fonts_Positec'

[edit] TransitionTime

Type: float

How fast should we transition between objects

[edit] Internal variables

[edit] BarPosition

Type: float

Modifiers: transient


[edit] bDownArrowPressed

Type: bool

Modifiers: transient

Whether or not the down arrow is currently pressed.

[edit] bDragging

Type: bool

Modifiers: transient


[edit] bInvalidated

Type: bool

Modifiers: transient

If true, the positions have been invalidated so recalculate the sizes/etc.

[edit] bIsMouseOverMenu

Type: bool

Modifiers: transient

True if the mouse cursor is currently over the menu

[edit] bIsUsingMouseNavigation

Type: bool

Modifiers: transient

True if we're currently using the mouse to navigate the menu

[edit] bTransitioning

Type: bool

Modifiers: transient


[edit] bUpArrowPressed

Type: bool

Modifiers: transient

Whether or not the up arrow is currently pressed.

[edit] DownArrowBounds

Type: float

Array size: 4

Modifiers: transient


[edit] DragAdjustment

Type: float

Modifiers: transient


[edit] LastMouseUpdate

Type: float


[edit] LastRenderTime

Type: float

Modifiers: transient

Last time this scene was rendered

[edit] ListHeightInPixel

Type: float

Modifiers: transient

How big is the list in pixels

[edit] OldBarPosition

Type: float

Modifiers: transient


[edit] OldSelection

Type: float

Modifiers: transient

Index of the previously selected widget.

[edit] ResScaling

Type: Object.Vector2D

Modifiers: transient

This is calculated once each frame and cached. It holds the resolution scaling factor that is forced to a 4:3 aspect ratio.

[edit] SelectionAlpha

Type: float

Modifiers: transient


[edit] SelectionPos

Type: float

Modifiers: transient

Floating point selection position (0 .. (List.length - 1))

[edit] StartSelectionTime

Type: float

Modifiers: transient

Used to animate the transition from one selection to another.

[edit] TargetWindowTop

Type: float

Modifiers: transient

Used to animate the scroll. These hold the target top position and the current transition timer

[edit] Top

Type: int

Modifiers: transient

Index of the current top widget

[edit] UpArrowBounds

Type: float

Array size: 4

Modifiers: transient

We cache the rendering bounds of the Up/Down arrows for quick mouse look up.

[edit] WindowHeight

Type: float

Modifiers: transient

How big is the rendering window

[edit] WindowTop

Type: float

Modifiers: transient

Defines the top of the window in to the overall list to begin rendering

[edit] WindowTopTransitionTime

Type: float

Modifiers: transient


[edit] Default values

Property Value
DefaultStates[3] Class'Engine.UIState_Active'
DefaultStates[4] Class'Engine.UIState_Pressed'

[edit] Subobjects

[edit] WidgetEventComponent

Class: Engine.UIComp_Event

Inherits from: UTDrawPanel.WidgetEventComponent

No new values.

[edit] Structs

[edit] SimpleListData

Modifiers: native

string Text 
int Tag 
float CurHeightMultiplier 
float TransitionAlpha 
Alpha to use to transition this item.
bool bWasRendered 

Default values:

Property Value
CurHeightMultiplier 1.0
TransitionAlpha 1.0

[edit] Delegates

[edit] OnDrawItem

delegate bool OnDrawItem (UTSimpleList SimpleList, int ItemIndex, float XPos, out float YPos)

This delegate allows anyone to alter the drawing code of the list.

Returns:

true to skip the default drawing

[edit] OnDrawSelectionBar

delegate bool OnDrawSelectionBar (UTSimpleList SimpleList, float YPos)


[edit] OnItemChosen

delegate OnItemChosen (UTSimpleList SourceList, int SelectedIndex, int PlayerIndex)

This delegate is called when an item in the list is chosen.

[edit] OnPostDrawSelectionBar

delegate bool OnPostDrawSelectionBar (UTSimpleList SimpleList, float YPos, float Width, float Height)


[edit] OnSelectionChange

delegate OnSelectionChange (UTSimpleList SourceList, int NewSelectedIndex)

This delegate is called when the selection index changes

[edit] Functions

[edit] Native functions

[edit] Find

native function int Find (string SearchText)

Returns:

the index of the first entry matching SearchText

[edit] FindTag

native function int FindTag (int SearchTag)

Returns:

the index of the first entry with a tag that matches SearchTag

[edit] SortList

native function SortList ()

Sorts the list

[edit] UpdateAnimation

native function UpdateAnimation (float DeltaTime)


[edit] Events

[edit] AddItem

event AddItem (string Text, optional int Tag)

Adds an item to the list

Parameters:

  • Text - String caption of what to add
  • Tag - A generic tag that can be assoicated with this list

ToDo: Add support for resolving markup on assignment.

[edit] DrawPanel

event DrawPanel ()

Overrides: UTDrawPanel.DrawPanel

Render the list. At this point each cell should be sized, etc.

[edit] Empty

event Empty ()

Empties the list

[edit] GetItemScale

event float GetItemScale (int ItemIdx, float SelectionPosValue, optional out float Alpha)

Calculates the scaling of the item as a value between 1.0f and SelectionCellHeightMultiplier given the item's index and the current selection position.

Parameters:

  • ItemIdx - Index of the item to calculate scale for.
  • SelectionPos - Current position of the selection bar.
  • Alpha - Out variable, between 0.0 - 1.0 of what the widget's transition alpha should be.

Returns:

Returns an item's scale height given the current position of the selection bar.

[edit] GetSupportedUIActionKeyNames

event GetSupportedUIActionKeyNames (out array<nameout_KeyNames)

Overrides: UIScreenObject.GetSupportedUIActionKeyNames

Allow Script to add UI Actions

[edit] ImportStringList

event ImportStringList (array<stringStringList)

Imports a string list and fills the array

Parameters:

  • StringList - The Stringlist to import

[edit] InsertItem

event InsertItem (int Index, string Text, optional int Tag)

Inserts a string somewhere in the stack

Parameters:

  • Text - String caption of what to add
  • Tag - A generic tag that can be assoicated with this list

ToDo: Add support for resolving markup on assignment.

[edit] PostInitialize

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

Setup the input system

[edit] RefreshBarPosition

event RefreshBarPosition ()

Refreshes the selection bar's position. Should be used when selection has changed or screen res has changed.

[edit] RemoveItem

event RemoveItem (int IndexToRemove)

Removes an item from the list

[edit] RemoveString

event RemoveString (string TextToRemove)

Attempts to find a string then remove it from the list

Parameters:

  • TextToRemove - The String to remove

[edit] SelectItem

event SelectItem (int NewSelection)

Selects an item

[edit] SetItemSelectionIndex

event SetItemSelectionIndex (float SelectionIndex)

Sets the selection index for all items. This is used to calculate item scaling as the bar moves around.

Parameters:

  • SelectionIndex - New selection index for the items, the item's distance from this value in the List array determines how much they scale.

[edit] SizeList

event SizeList ()

SizeList is called directly before rendering anything in the list.

[edit] Other instance functions

[edit] CalculateSelectionBGPosition

function float CalculateSelectionBGPosition (int SelectedIdx)

Calculates where the selection bar should be given a selected item index.

Parameters:

  • SelectedIdx - Item to calculate selection position for.

Returns:

Returns the position of the selection bar in pixels.

[edit] ComputeListHeightWithSelection

function float ComputeListHeightWithSelection (bool bMaximum)

Computes the maximum possible height of the list, taking into account 'bubble scaling'

Parameters:

  • bMaximum - True to compute the maximum height of the list, or false for the minimum

Returns:

Returns the maximum height of the list in pixels

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

[edit] DrawItem

function DrawItem (int ItemIndex, float XPos, out float YPos)

Draws an item to the screen. NOTE this function can assume that the item being drawn is not the selected item

[edit] DrawSelectionBG

function DrawSelectionBG (float YPos)

Draw the selection Bar

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


[edit] DrawStringToFit

function DrawStringToFit (string StringToDraw, float XPos, float Y1, float Y2)


[edit] GetDefaultCellHeight

function float GetDefaultCellHeight ()

Returns:

Returns the height of an menu item (without any 'bubble scaling' applied)

[edit] GetItemHeightInPixels

function float GetItemHeightInPixels (float ItemScale)

Returns:

Converts an item's scale height to pixels.

[edit] GetMousePosition

function Object.Vector GetMousePosition ()

Returns:

the mouse position in widget space

[edit] GetSelectedCellHeight

function float GetSelectedCellHeight ()

Returns:

Returns the height of a selected menu item in pixels.

[edit] GetTag

function int GetTag ()


[edit] GetText

function string GetText ()


[edit] InterpLinearColor

function Object.LinearColor InterpLinearColor (Object.LinearColor A, Object.LinearColor B, float Alpha)

Returns:

Linearly interpolates between 2 linear colors.

[edit] IsMouseOverMenu

function bool IsMouseOverMenu ()

Returns true if the mouse cursor is currently over the menu

Returns:

True if the mouse cursor is over the menu

[edit] ItemChosen

function ItemChosen (int PlayerIndex)


[edit] LinearColorToColor

function Object.Color LinearColorToColor (Object.LinearColor Src)

Returns:

Creates a color from a linear color by clamping values to 0-255.

[edit] MouseInBounds

function bool MouseInBounds ()


[edit] OnMouseOverMenu

function OnMouseOverMenu (bool bIsOverMenu)

Called when the mouse cursor moves onto or off of the menu

Parameters:

  • bIsOverMenu - True if mouse cursor is over the menu, otherwise false

[edit] PgDn

function PgDn ()

Move down 10 items

[edit] PgUp

function PgUp ()

Move up 10 items

[edit] ProcessInputAxis

function bool ProcessInputAxis (const out UIRoot.SubscribedInputEventParameters EventParms)

Enable hottracking if we are dragging

[edit] ProcessInputKey

function bool ProcessInputKey (const out UIRoot.SubscribedInputEventParameters EventParms)


[edit] ResolveText

function string ResolveText (string Markup)

Attempt to resolve markup to it's string value

Returns:

the resolve text or the original text if unresolable

[edit] SelectUnderCursor

function bool SelectUnderCursor ()

Select whichever widget happens to be under the cursor

Returns:

Returns TRUE if we selected something, FALSE otherwise.

[edit] SetBarPositionUsingMouseY

function SetBarPositionUsingMouseY ()

Sets the bar position using the current mouse position.

[edit] ToStrings

function ToStrings (out array<stringStringList, optional bool bAppend)

Returns:

the list as an array of strings

[edit] UpdateMouseOverMenu

function UpdateMouseOverMenu ()

Updates whether or not the mouse is currently over the menu and runs the appropriate callback if needed

Personal tools