ReaorderableList with advanced options.
Properties | |
string | ListName [get, set] |
Name of the list. More... | |
Public Member Functions | |
AdvancedReorderableList (IList list, Type elementsType, UnityEngine.Object owner, string listName="AdvancedReorderableList") | |
Constructor with a list not serialized. More... | |
new void | DoLayoutList () |
Call base DoLayoutList() with new handler. More... | |
new void | DoList (Rect rect) |
Call base DoList() with new handler. More... | |
void | AddItemWithUndo (ReorderableList list) |
Add a new empty element. More... | |
void | RemoveItemWithUndoAndWarning (ReorderableList list) |
Delete the selected element after a warning message. More... | |
void | NameNextControl (int index, string fieldName="") |
Set next control name with a formatted name used in OnElementFocusedHandler(). More... | |
void | Focus (int index=0) |
Set the focus of the window to the first element's field of the list if one have been Named. More... | |
Protected Attributes | |
string | _listName |
Name of the list. More... | |
UnityEngine.Object | _owner |
The Object wich own the list. More... | |
string | _baseElementName = "" |
Base name of the element. More... | |
string | _baseFirstFieldName = "" |
Base name for the first field of the list. More... | |
string | _nextFocusName = "" |
Name of the next element to focus. More... | |
bool | _fieldHasBeenNamed = false |
Have the fields been named. More... | |
bool | _keyHeld = false |
Say if allowed input are held or not. More... | |
Protected Member Functions | |
void | OnInputHandler () |
Handler to input.Have to be call in an update function. More... | |
void | OnElementFocusedHandler () |
According list index to the focused element. More... | |
void | OnFocusHasToChangedHandler () |
If a new focus has been defined by the function Focus(), update the Controle Focus in the list. More... | |
string | ElementName (int index) |
Return the given index element name formatted to be read by the OnElementFocusedHandler(). More... | |
|
getset |
Name of the list.
Nectunia.Utility.AdvancedReorderableList.AdvancedReorderableList | ( | IList | list, |
Type | elementsType, | ||
UnityEngine.Object | owner, | ||
string | listName = "AdvancedReorderableList" |
||
) |
Constructor with a list not serialized.
list | The list to draw. |
elementsType | Type of the list elements. |
owner | The Object in wich the list is. |
listName | The name of the list. |
"-" is forbiden for this value.
void Nectunia.Utility.AdvancedReorderableList.AddItemWithUndo | ( | ReorderableList | list | ) |
Add a new empty element.
list | The list to update. |
new void Nectunia.Utility.AdvancedReorderableList.DoLayoutList | ( | ) |
Call base DoLayoutList() with new handler.
new void Nectunia.Utility.AdvancedReorderableList.DoList | ( | Rect | rect | ) |
Call base DoList() with new handler.
|
protected |
Return the given index element name formatted to be read by the OnElementFocusedHandler().
index | The element index to return the name. |
void Nectunia.Utility.AdvancedReorderableList.Focus | ( | int | index = 0 | ) |
Set the focus of the window to the first element's field of the list if one have been Named.
index | The element index to focus. |
void Nectunia.Utility.AdvancedReorderableList.NameNextControl | ( | int | index, |
string | fieldName = "" |
||
) |
Set next control name with a formatted name used in OnElementFocusedHandler().
index | The element index to return the name. |
fieldName | Current field name for the element. |
|
protected |
According list index to the focused element.
|
protected |
If a new focus has been defined by the function Focus(), update the Controle Focus in the list.
|
protected |
Handler to input.Have to be call in an update function.
Ctrl+ => Add an new item in the list.
Ctrl- => Delete the selected item.
void Nectunia.Utility.AdvancedReorderableList.RemoveItemWithUndoAndWarning | ( | ReorderableList | list | ) |
Delete the selected element after a warning message.
list | The list to update. |
|
protected |
Base name of the element.
|
protected |
Base name for the first field of the list.
|
protected |
Have the fields been named.
|
protected |
Say if allowed input are held or not.
|
protected |
Name of the list.
|
protected |
Name of the next element to focus.
|
protected |
The Object wich own the list.