NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UITable Class Reference

All children added to the game object with this script will be arranged into a table with rows and columns automatically adjusting their size to fit their content (think "table" tag in HTML). More...

Inheritance diagram for UITable:
UIWidgetContainer

Public Types

enum  Direction { Direction.Down, Direction.Up }
 
enum  Sorting {
  Sorting.None, Sorting.Alphabetic, Sorting.Horizontal, Sorting.Vertical,
  Sorting.Custom
}
 

Public Member Functions

delegate void OnReposition ()
 
List< Transform > GetChildList ()
 Get the current list of the grid's children. More...
 
virtual void Reposition ()
 Recalculate the position of all elements within the table, sorting them alphabetically if necessary. More...
 

Public Attributes

int columns = 0
 How many columns there will be before a new line is started. 0 means unlimited. More...
 
Direction direction = Direction.Down
 Which way the new lines will be added. More...
 
Sorting sorting = Sorting.None
 How to sort the grid's elements. More...
 
UIWidget.Pivot pivot = UIWidget.Pivot.TopLeft
 Final pivot point for the grid's content. More...
 
bool hideInactive = true
 Whether inactive children will be discarded from the table's calculations. More...
 
bool keepWithinPanel = false
 Whether the parent container will be notified of the table's changes. More...
 
Vector2 padding = Vector2.zero
 Padding around each entry, in pixels. More...
 
OnReposition onReposition
 Delegate function that will be called when the table repositions its content. More...
 
System.Comparison< Transform > onCustomSort
 Custom sort delegate, used when the sorting method is set to 'custom'. More...
 

Protected Member Functions

virtual void Sort (List< Transform > list)
 Want your own custom sorting logic? Override this function. More...
 
virtual void Start ()
 Position the grid's contents when the script starts. More...
 
virtual void Init ()
 Find the necessary components. More...
 
virtual void LateUpdate ()
 Is it time to reposition? Do so now. More...
 
void RepositionVariableSize (List< Transform > children)
 Positions the grid items, taking their own size into consideration. More...
 

Protected Attributes

UIPanel mPanel
 
bool mInitDone = false
 
bool mReposition = false
 

Properties

bool repositionNow [set]
 Reposition the children on the next Update(). More...
 

Detailed Description

All children added to the game object with this script will be arranged into a table with rows and columns automatically adjusting their size to fit their content (think "table" tag in HTML).

Member Enumeration Documentation

Enumerator
Down 
Up 
Enumerator
None 
Alphabetic 
Horizontal 
Vertical 
Custom 

Member Function Documentation

List<Transform> UITable.GetChildList ( )

Get the current list of the grid's children.

virtual void UITable.Init ( )
protectedvirtual

Find the necessary components.

virtual void UITable.LateUpdate ( )
protectedvirtual

Is it time to reposition? Do so now.

delegate void UITable.OnReposition ( )
virtual void UITable.Reposition ( )
virtual

Recalculate the position of all elements within the table, sorting them alphabetically if necessary.

void UITable.RepositionVariableSize ( List< Transform >  children)
protected

Positions the grid items, taking their own size into consideration.

virtual void UITable.Sort ( List< Transform >  list)
protectedvirtual

Want your own custom sorting logic? Override this function.

virtual void UITable.Start ( )
protectedvirtual

Position the grid's contents when the script starts.

Member Data Documentation

int UITable.columns = 0

How many columns there will be before a new line is started. 0 means unlimited.

Direction UITable.direction = Direction.Down

Which way the new lines will be added.

bool UITable.hideInactive = true

Whether inactive children will be discarded from the table's calculations.

bool UITable.keepWithinPanel = false

Whether the parent container will be notified of the table's changes.

bool UITable.mInitDone = false
protected
UIPanel UITable.mPanel
protected
bool UITable.mReposition = false
protected
System.Comparison<Transform> UITable.onCustomSort

Custom sort delegate, used when the sorting method is set to 'custom'.

OnReposition UITable.onReposition

Delegate function that will be called when the table repositions its content.

Vector2 UITable.padding = Vector2.zero

Padding around each entry, in pixels.

UIWidget.Pivot UITable.pivot = UIWidget.Pivot.TopLeft

Final pivot point for the grid's content.

Sorting UITable.sorting = Sorting.None

How to sort the grid's elements.

Property Documentation

bool UITable.repositionNow
set

Reposition the children on the next Update().


The documentation for this class was generated from the following file: