NGUI: Next-Gen UI kit  3.6.8
 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 ()
 
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...
 
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...
 

Protected Member Functions

virtual void Sort (List< Transform > list)
 Want your own custom sorting logic? Override this function. More...
 
void RepositionVariableSize (List< Transform > children)
 Positions the grid items, taking their own size into consideration. 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...
 

Protected Attributes

UIPanel mPanel
 
bool mInitDone = false
 
bool mReposition = false
 
List< Transform > mChildren = new List<Transform>()
 

Properties

bool repositionNow [set]
 Reposition the children on the next Update(). More...
 
List< Transform > children [get]
 Returns the list of table's children, sorted alphabetically if necessary. 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

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.

List<Transform> UITable.mChildren = new List<Transform>()
protected
bool UITable.mInitDone = false
protected
UIPanel UITable.mPanel
protected
bool UITable.mReposition = false
protected
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.

Sorting UITable.sorting = Sorting.None

How to sort the grid's elements.

Property Documentation

List<Transform> UITable.children
get

Returns the list of table's children, sorted alphabetically if necessary.

bool UITable.repositionNow
set

Reposition the children on the next Update().


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