Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UTGame.UTSimpleList

Extends
UTDrawPanel
Modifiers
native ( UI )

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

Core.Object
|   
+-- Engine.UIRoot
   |   
   +-- Engine.UIScreenObject
      |   
      +-- Engine.UIObject
         |   
         +-- UTGame.UTUI_Widget
            |   
            +-- UTGame.UTDrawPanel
               |   
               +-- UTGame.UTSimpleList

Direct Known Subclasses:

UTMapVoteList, UTSimpleMenu, UTUIMenuList

Variables Summary
floatBarPosition
boolbDownArrowPressed
boolbDragging
boolbInvalidated
boolbIsMouseOverMenu
boolbIsUsingMouseNavigation
boolbTransitioning
boolbUpArrowPressed
floatDownArrowBounds[4]
floatDragAdjustment
floatLastMouseUpdate
floatLastRenderTime
floatListHeightInPixel
floatOldBarPosition
floatOldSelection
vector2DResScaling
floatSelectionAlpha
floatSelectionPos
floatStartSelectionTime
floatTargetWindowTop
intTop
floatUpArrowBounds[4]
floatWindowHeight
floatWindowTop
floatWindowTopTransitionTime
UTSimpleList
floatAboveBelowCellHeightMultiplier
colorAboveBelowColor
colorArrowColor
texture2DArrowImage
boolbHideScrollArrows
boolbHorizontalList
boolbHotTracking
intBubbleRadius
boolbWrapList
floatDefaultCellHeight
array<SimpleListData>List
colorNormalColor
vector2DNormalTextOffset
vector2DNormalTextPadding
floatScrollWidthRatio
colorSelectedColor
vector2DSelectedTextOffset
vector2DSelectedTextPadding
intSelection
colorSelectionBarColor
floatSelectionCellHeightMultiplier
texture2DSelectionImage
floatSelectionImageBarU
floatSelectionImageBarUL
floatSelectionImageBarV
floatSelectionImageBarVL
floatSelectionImageIconBGU
floatSelectionImageIconBGUL
floatSelectionImageIconBGV
floatSelectionImageIconBGVL
colorShadowColor
floatShadowDist
fontTextFont
floatTransitionTime
Inherited Variables from UTGame.UTDrawPanel
bUseFullViewport, Canvas, pHeight, pLeft, pTop, pWidth, ResolutionScale
Inherited Variables from UTGame.UTUI_Widget
bRequiresTick, UTSceneOwner

Structures Summary
SimpleListData
Text, Tag, CurHeightMultiplier, TransitionAlpha, bWasRendered

Delegates Summary
delegatebool OnDrawItem (UTSimpleList SimpleList, int ItemIndex, float XPos, out float YPos))
delegatebool OnDrawSelectionBar (UTSimpleList SimpleList, float YPos ))
delegate OnItemChosen (UTSimpleList SourceList, int SelectedIndex, int PlayerIndex)
delegatebool OnPostDrawSelectionBar (UTSimpleList SimpleList, float YPos, float Width, float Height))
delegate OnSelectionChange (UTSimpleList SourceList, int NewSelectedIndex)
Inherited Delegates from UTGame.UTDrawPanel
DrawDelegate

Functions Summary
event AddItem (string Text, optional int Tag=-1))
functionfloat CalculateSelectionBGPosition (int SelectedIdx))
functionfloat ComputeListHeightWithSelection (bool bMaximum ))
functionbool CursorCheck (float X1, float Y1, float X2, float Y2))
function DrawItem (int ItemIndex, float XPos, out float YPos))
event DrawPanel ()))
function DrawSelectionBG (float YPos))
function DrawSpecial (float x, float y, float w, float h, float u, float v, float ul, float vl, color DrawColor, bool bOver, bool bPressed))
function DrawStringToFit (string StringToDraw, float XPos, float Y1, float Y2))
event Empty ()))
functionint Find (string SearchText)
functionint FindTag (int SearchTag)
functionfloat GetDefaultCellHeight ()))
functionfloat GetItemHeightInPixels (float ItemScale))
eventfloat GetItemScale (int ItemIdx, float SelectionPosValue, optional out float Alpha))
functionVector GetMousePosition ()))
functionfloat GetSelectedCellHeight ()))
event GetSupportedUIActionKeyNames (out array out_KeyNames ))
functionint GetTag ()))
functionstring GetText ()))
event ImportStringList (array<string> StringList))
event InsertItem (int Index, string Text, optional int Tag=-1))
functionLinearColor InterpLinearColor (LinearColor A, LinearColor B, float Alpha))
functionbool IsMouseOverMenu ()))
function ItemChosen (int PlayerIndex))
functioncolor LinearColorToColor (LinearColor Src))
functionbool MouseInBounds ()))
function OnMouseOverMenu (bool bIsOverMenu ))
function PgDn ()))
function PgUp ()))
event PostInitialize ()))
functionbool ProcessInputAxis (const out SubscribedInputEventParameters EventParms ))
functionbool ProcessInputKey (const out SubscribedInputEventParameters EventParms ))
event RefreshBarPosition ()))
event RemoveItem (int IndexToRemove))
event RemoveString (string TextToRemove))
functionstring ResolveText (string Markup))
event SelectItem (int NewSelection))
functionbool SelectUnderCursor ()))
function SetBarPositionUsingMouseY ()))
event SetItemSelectionIndex (float SelectionIndex))
event SizeList ()))
function SortList ()
function ToStrings (out array<string> StringList, optional bool bAppend))
function UpdateAnimation (FLOAT DeltaTime)
function UpdateMouseOverMenu ()))
Inherited Functions from UTGame.UTDrawPanel
Draw2DLine, DrawPanel
Inherited Functions from UTGame.UTUI_Widget
FindDataStore, GetPlayerControllerId, NotifyGameSessionEnded


Variables Detail

BarPosition Source code

var transient float BarPosition;

bDownArrowPressed Source code

var transient bool bDownArrowPressed;
Whether or not the down arrow is currently pressed.

bDragging Source code

var transient bool bDragging;

bInvalidated Source code

var transient bool bInvalidated;
If true, the positions have been invalidated so recalculate the sizes/etc.

bIsMouseOverMenu Source code

var transient bool bIsMouseOverMenu;
True if the mouse cursor is currently over the menu

bIsUsingMouseNavigation Source code

var transient bool bIsUsingMouseNavigation;
True if we're currently using the mouse to navigate the menu

bTransitioning Source code

var transient bool bTransitioning;

bUpArrowPressed Source code

var transient bool bUpArrowPressed;
Whether or not the up arrow is currently pressed.

DownArrowBounds[4] Source code

var transient float DownArrowBounds[4];

DragAdjustment Source code

var transient float DragAdjustment;

LastMouseUpdate Source code

var float LastMouseUpdate;

LastRenderTime Source code

var transient float LastRenderTime;
Last time this scene was rendered

ListHeightInPixel Source code

var transient float ListHeightInPixel;
How big is the list in pixels

OldBarPosition Source code

var transient float OldBarPosition;

OldSelection Source code

var transient float OldSelection;
Index of the previously selected widget.

ResScaling Source code

var transient vector2D ResScaling;
This is calculated once each frame and cached. It holds the resolution scaling factor

SelectionAlpha Source code

var transient float SelectionAlpha;

SelectionPos Source code

var transient float SelectionPos;
Floating point selection position (0 .. (List.length - 1))

StartSelectionTime Source code

var transient float StartSelectionTime;
Used to animate the transition from one selection to another.

TargetWindowTop Source code

var transient float TargetWindowTop;
Used to animate the scroll. These hold the target top position and the current transition timer

Top Source code

var transient int Top;
Index of the current top widget

UpArrowBounds[4] Source code

var transient float UpArrowBounds[4];
We cache the rendering bounds of the Up/Down arrows for quick mouse look up.

WindowHeight Source code

var transient float WindowHeight;
How big is the rendering window

WindowTop Source code

var transient float WindowTop;
Defines the top of the window in to the overall list to begin rendering

WindowTopTransitionTime Source code

var transient float WindowTopTransitionTime;

UTSimpleList

AboveBelowCellHeightMultiplier Source code

var(UTSimpleList) float AboveBelowCellHeightMultiplier;
How mucbh to multiply the above and below cells by

AboveBelowColor Source code

var(UTSimpleList) color AboveBelowColor;

ArrowColor Source code

var(UTSimpleList) color ArrowColor;

ArrowImage Source code

var(UTSimpleList) texture2D ArrowImage;

bHideScrollArrows Source code

var(UTSimpleList) bool bHideScrollArrows;

bHorizontalList Source code

var(UTSimpleList) bool bHorizontalList;
Whether we are a vertical or horizontal list.

bHotTracking Source code

var(UTSimpleList) bool bHotTracking;
Whether or not to hot track the current item mouse cursor.

BubbleRadius Source code

var(UTSimpleList) int BubbleRadius;
Size of the selection bubble, used to calculate alpha for items around the selected item.

bWrapList Source code

var(UTSimpleList) bool bWrapList;
Whether or not the list should wrap.

DefaultCellHeight Source code

var(UTSimpleList) float DefaultCellHeight;
This is how big the normal cell of text is at 1024x768.

List Source code

var(UTSimpleList) editinline array<SimpleListData> List;
The list itself.

NormalColor Source code

var(UTSimpleList) color NormalColor;

NormalTextOffset Source code

var(UTSimpleList) vector2D NormalTextOffset;

NormalTextPadding Source code

var(UTSimpleList) vector2D NormalTextPadding;
Padding and offset percentage for a normal list item's text.

ScrollWidthRatio Source code

var(UTSimpleList) float ScrollWidthRatio;
This is the ratio of Height to widget for the selection widget's box. It will be used to size the list

SelectedColor Source code

var(UTSimpleList) color SelectedColor;

SelectedTextOffset Source code

var(UTSimpleList) vector2D SelectedTextOffset;

SelectedTextPadding Source code

var(UTSimpleList) vector2D SelectedTextPadding;
Padding and offset percentage for a selected list item's text.

Selection Source code

var(UTSimpleList) transient int Selection;
Index of the currently selected widget

SelectionBarColor Source code

var(UTSimpleList) color SelectionBarColor;

SelectionCellHeightMultiplier Source code

var(UTSimpleList) float SelectionCellHeightMultiplier;
How much to multiply the selected cell by

SelectionImage Source code

var(UTSimpleList) texture2D SelectionImage;
Selection Image texture.

SelectionImageBarU Source code

var(UTSimpleList) float SelectionImageBarU;
Selection bar image UVs.

SelectionImageBarUL Source code

var(UTSimpleList) float SelectionImageBarUL;

SelectionImageBarV Source code

var(UTSimpleList) float SelectionImageBarV;

SelectionImageBarVL Source code

var(UTSimpleList) float SelectionImageBarVL;

SelectionImageIconBGU Source code

var(UTSimpleList) float SelectionImageIconBGU;
Selection bar icon bg UVs.

SelectionImageIconBGUL Source code

var(UTSimpleList) float SelectionImageIconBGUL;

SelectionImageIconBGV Source code

var(UTSimpleList) float SelectionImageIconBGV;

SelectionImageIconBGVL Source code

var(UTSimpleList) float SelectionImageIconBGVL;

ShadowColor Source code

var(UTSimpleList) color ShadowColor;
Color of text drop shadow.

ShadowDist Source code

var(UTSimpleList) float ShadowDist;
Distance of the text drop shadow.

TextFont Source code

var(UTSimpleList) font TextFont;
The font to use for rendering

TransitionTime Source code

var(UTSimpleList) float TransitionTime;
How fast should we transition between objects


Structures Detail

SimpleListData Source code

struct SimpleListData
{
var bool bWasRendered;
var float CurHeightMultiplier;
var(UTSimpleList) int Tag;
var(UTSimpleList) string Text;
var float TransitionAlpha;
};

TransitionAlpha:
Alpha to use to transition this item.


Delegates Detail

OnDrawItem Source code

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

OnDrawSelectionBar Source code

delegate bool OnDrawSelectionBar ( UTSimpleList SimpleList, float YPos ) )

OnItemChosen Source code

delegate OnItemChosen ( UTSimpleList SourceList, int SelectedIndex, int PlayerIndex )
This delegate is called when an item in the list is chosen.

OnPostDrawSelectionBar Source code

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

OnSelectionChange Source code

delegate OnSelectionChange ( UTSimpleList SourceList, int NewSelectedIndex )
This delegate is called when the selection index changes


Functions Detail

AddItem Source code

event AddItem ( string Text, optional int Tag=-1) )
Adds an item to the list @Param Text String caption of what to add @Param Tag A generic tag that can be assoicated with this list @ToDo: Add support for resolving markup on assignment.

CalculateSelectionBGPosition Source code

function float CalculateSelectionBGPosition ( int SelectedIdx) )
Calculates where the selection bar should be given a selected item index.
@param SelectedIdx Item to calculate selection position for.
@return Returns the position of the selection bar in pixels.

ComputeListHeightWithSelection Source code

function float ComputeListHeightWithSelection ( bool bMaximum ) )
Computes the maximum possible height of the list, taking into account 'bubble scaling'
@param bMaximum True to compute the maximum height of the list, or false for the minimum
@return Returns the maximum height of the list in pixels

CursorCheck Source code

function bool CursorCheck ( float X1, float Y1, float X2, float Y2) )
All are in pixels @Param X1 Left @Param Y1 Top @Param X2 Right @Param Y2 Bottom @Returns true if the mouse is within the bounds given

DrawItem Source code

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

DrawPanel Source code

event DrawPanel ( ) )
Render the list. At this point each cell should be sized, etc.

DrawSelectionBG Source code

function DrawSelectionBG ( float YPos) )
Draw the selection Bar

DrawSpecial Source code

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

DrawStringToFit Source code

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

Empty Source code

event Empty ( ) )
Empties the list

Find Source code

native function int Find ( string SearchText )
@Returns the index of the first entry matching SearchText

FindTag Source code

native function int FindTag ( int SearchTag )
@Returns the index of the first entry with a tag that matches SearchTag

GetDefaultCellHeight Source code

function float GetDefaultCellHeight ( ) )

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

GetItemHeightInPixels Source code

function float GetItemHeightInPixels ( float ItemScale) )

@return Converts an item's scale height to pixels.

GetItemScale Source code

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.
@param ItemIdx Index of the item to calculate scale for.
@param SelectionPos Current position of the selection bar.
@param Alpha Out variable, between 0.0 - 1.0 of what the widget's transition alpha should be.
@return Returns an item's scale height given the current position of the selection bar.

GetMousePosition Source code

function Vector GetMousePosition ( ) )
@Returns the mouse position in widget space

GetSelectedCellHeight Source code

function float GetSelectedCellHeight ( ) )

@return Returns the height of a selected menu item in pixels.

GetSupportedUIActionKeyNames Source code

event GetSupportedUIActionKeyNames ( out array<Name> out_KeyNames ) )

GetTag Source code

function int GetTag ( ) )

GetText Source code

function string GetText ( ) )

ImportStringList Source code

event ImportStringList ( array<string> StringList) )
Imports a string list and fills the array @Param StringList The Stringlist to import

InsertItem Source code

event InsertItem ( int Index, string Text, optional int Tag=-1) )
Inserts a string somewhere in the stack @Param Text String caption of what to add @Param Tag A generic tag that can be assoicated with this list @ToDo: Add support for resolving markup on assignment.

InterpLinearColor Source code

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

@return Linearly interpolates between 2 linear colors.

IsMouseOverMenu Source code

function bool IsMouseOverMenu ( ) )
Returns true if the mouse cursor is currently over the menu
@return True if the mouse cursor is over the menu

ItemChosen Source code

function ItemChosen ( int PlayerIndex) )

LinearColorToColor Source code

function color LinearColorToColor ( LinearColor Src) )

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

MouseInBounds Source code

function bool MouseInBounds ( ) )

OnMouseOverMenu Source code

function OnMouseOverMenu ( bool bIsOverMenu ) )
Called when the mouse cursor moves onto or off of the menu
@param bIsOverMenu True if mouse cursor is over the menu, otherwise false

PgDn Source code

function PgDn ( ) )
Move down 10 items

PgUp Source code

function PgUp ( ) )
Move up 10 items

PostInitialize Source code

event PostInitialize ( ) )
Setup the input system

ProcessInputAxis Source code

function bool ProcessInputAxis ( const out SubscribedInputEventParameters EventParms ) )
Enable hottracking if we are dragging

ProcessInputKey Source code

function bool ProcessInputKey ( const out SubscribedInputEventParameters EventParms ) )

RefreshBarPosition Source code

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

RemoveItem Source code

event RemoveItem ( int IndexToRemove) )
Removes an item from the list

RemoveString Source code

event RemoveString ( string TextToRemove) )
Attempts to find a string then remove it from the list @Param TextToRemove The String to remove

ResolveText Source code

function string ResolveText ( string Markup) )
Attempt to resolve markup to it's string value @Returns the resolve text or the original text if unresolable

SelectItem Source code

event SelectItem ( int NewSelection) )
Selects an item

SelectUnderCursor Source code

function bool SelectUnderCursor ( ) )
Select whichever widget happens to be under the cursor
@return Returns TRUE if we selected something, FALSE otherwise.

SetBarPositionUsingMouseY Source code

function SetBarPositionUsingMouseY ( ) )
Sets the bar position using the current mouse position.

SetItemSelectionIndex Source code

event SetItemSelectionIndex ( float SelectionIndex) )
Sets the selection index for all items. This is used to calculate item scaling as the bar moves around.
@param SelectionIndex New selection index for the items, the item's distance from this value in the List array determines how much they scale.

SizeList Source code

event SizeList ( ) )
SizeList is called directly before rendering anything in the list.

SortList Source code

native function SortList ( )
Sorts the list

ToStrings Source code

function ToStrings ( out array<string> StringList, optional bool bAppend) )
@Returns the list as an array of strings

UpdateAnimation Source code

native function UpdateAnimation ( FLOAT DeltaTime )

UpdateMouseOverMenu Source code

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


Defaultproperties

defaultproperties
{
   TextFont=MultiFont'UI_Fonts_Final.Menus.Fonts_Positec'
   NormalColor=(B=64,G=64,R=192,A=255)
   AboveBelowColor=(B=32,G=32,R=128,A=255)
   SelectedColor=(B=255,G=255,R=255,A=255)
   SelectionBarColor=(B=1,G=0,R=64,A=225)
   ArrowColor=(B=1,G=0,R=128,A=255)
   SelectionImage=Texture2D'UI_HUD.HUD.UI_HUD_BaseD'
   SelectionImageIconBGU=260.000000
   SelectionImageIconBGUL=80.000000
   SelectionImageIconBGVL=76.000000
   SelectionImageBarU=340.000000
   SelectionImageBarUL=361.000000
   SelectionImageBarVL=76.000000
   ArrowImage=Texture2D'UI_HUD.HUD.UI_HUD_BaseC'
   DefaultCellHeight=23.000000
   AboveBelowCellHeightMultiplier=1.500000
   SelectionCellHeightMultiplier=3.250000
   ScrollWidthRatio=1.293470
   bHideScrollArrows=True
   bWrapList=True
   SelectedTextPadding=(X=0.000000,Y=0.200000)
   SelectedTextOffset=(X=0.000000,Y=0.050000)
   ShadowDist=1.000000
   ShadowColor=(B=0,G=0,R=0,A=255)
   Selection=-1
   BubbleRadius=2
   DefaultStates(3)=Class'Engine.UIState_Active'
   DefaultStates(4)=Class'Engine.UIState_Pressed'
   Begin Object Class=UIComp_Event Name=WidgetEventComponent ObjName=WidgetEventComponent Archetype=UIComp_Event'UTGame.Default__UTDrawPanel:WidgetEventComponent'
      ObjectArchetype=UIComp_Event'UTGame.Default__UTDrawPanel:WidgetEventComponent'
   End Object
   EventProvider=WidgetEventComponent
   Name="Default__UTSimpleList"
   ObjectArchetype=UTDrawPanel'UTGame.Default__UTDrawPanel'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: sk 18-3-2018 10:00:56.920 - Created with UnCodeX