Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Public Attributes | Properties | List of all members
KSP.UI.UIList Class Reference

List for organizing items within a transform handled by a LayoutGroup. The only responsibility of this component is to add/remove/sort elements in this transform. More...

Inheritance diagram for KSP.UI.UIList:

Classes

class  ListDropEvent< UIList, UIListItem, integer >
 Event fired from UIListDropArea More...
 

Public Member Functions

void AddItem (UIListItem item, bool forceZ=true)
 
void Clear (bool destroyElements)
 
void ClearUI (Transform tmpTransform)
 
bool Contains (UIListItem item)
 
int GetDropItemIndex (UIListItem item)
 
List< UIListData< UIListItem >
>.Enumerator 
GetEnumerator ()
 
int GetIndex (UIListItem item)
 
UIListItem GetUilistItemAt (int index)
 
List< UIListItemGetUiListItems ()
 
void InsertItem (UIListItem item, int index, bool forceZ=true, bool worldPositionStays=false)
 
void Refresh ()
 
bool RemoveItem (UIListItem item, bool deleteItem=false)
 
bool RemoveItem (int index, bool deleteItem=false)
 
bool RemoveItemAndMove (UIListItem item, Transform newParent, bool forceZ=true, bool worldPositionStays=false)
 
void SetActive (bool active)
 
void SetAnchor (RectTransform t)
 
void SwapItems (UIListItem item1, UIListItem item2, bool forzeZ=true, bool worldPositionStays=false)
 

Public Attributes

bool AddItemsOnStart
 If true the list will add all children with a UIListItem component to the UIList More...
 
ListDropEvent< UIList,
UIListItem, int > 
onDrop = new ListDropEvent<UIList, UIListItem, int>()
 
UIListItem placeholder
 

Properties

UIListToggleController Controller [get]
 
int Count [get]
 
Transform ListAnchor [get]
 

Detailed Description

List for organizing items within a transform handled by a LayoutGroup. The only responsibility of this component is to add/remove/sort elements in this transform.

Member Function Documentation

void KSP.UI.UIList.AddItem ( UIListItem  item,
bool  forceZ = true 
)
inline
void KSP.UI.UIList.Clear ( bool  destroyElements)
inline
void KSP.UI.UIList.ClearUI ( Transform  tmpTransform)
inline
bool KSP.UI.UIList.Contains ( UIListItem  item)
inline
int KSP.UI.UIList.GetDropItemIndex ( UIListItem  item)
inline

Returns the index for the item being dropped, based on the index for the existing item closest to it

WARNING: This may not match the index given by UIListItem.DropEvent.

Will return 0 if the list is empty

Parameters
item
Returns
List<UIListData<UIListItem> >.Enumerator KSP.UI.UIList.GetEnumerator ( )
inline
int KSP.UI.UIList.GetIndex ( UIListItem  item)
inline
UIListItem KSP.UI.UIList.GetUilistItemAt ( int  index)
inline
List<UIListItem> KSP.UI.UIList.GetUiListItems ( )
inline
void KSP.UI.UIList.InsertItem ( UIListItem  item,
int  index,
bool  forceZ = true,
bool  worldPositionStays = false 
)
inline
void KSP.UI.UIList.Refresh ( )
inline
bool KSP.UI.UIList.RemoveItem ( UIListItem  item,
bool  deleteItem = false 
)
inline
bool KSP.UI.UIList.RemoveItem ( int  index,
bool  deleteItem = false 
)
inline
bool KSP.UI.UIList.RemoveItemAndMove ( UIListItem  item,
Transform  newParent,
bool  forceZ = true,
bool  worldPositionStays = false 
)
inline
void KSP.UI.UIList.SetActive ( bool  active)
inline
void KSP.UI.UIList.SetAnchor ( RectTransform  t)
inline
void KSP.UI.UIList.SwapItems ( UIListItem  item1,
UIListItem  item2,
bool  forzeZ = true,
bool  worldPositionStays = false 
)
inline

Member Data Documentation

bool KSP.UI.UIList.AddItemsOnStart

If true the list will add all children with a UIListItem component to the UIList

ListDropEvent<UIList, UIListItem, int> KSP.UI.UIList.onDrop = new ListDropEvent<UIList, UIListItem, int>()
UIListItem KSP.UI.UIList.placeholder

Property Documentation

UIListToggleController KSP.UI.UIList.Controller
get
int KSP.UI.UIList.Count
get
Transform KSP.UI.UIList.ListAnchor
get

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