Editor GUI Table  2.3
Allows programmers to easily create customizable tables in Unity Editor
EditorGUITable.GUITableState Class Reference

The current state of the GUITable. This has to be used the same way state parameters are used in Unity GUI functions, like the scroll position in BeginScrollView. It has to be passed from one GUI frame to another by keeping a reference in your calling code. More...

Public Member Functions

 GUITableState (string prefsKey)
 Initializes a EditorGUITable.GUITableState with a key to save it in EditorPrefs. This constructor can't be used in ScriptableObject's constructor or in the property's declaration, because it uses the EditorPrefs. Use it in OnEnable or Awake instead. More...
 
void SetReorderableList (ReorderableList reorderableList)
 
void Save ()
 
void CheckState (List< TableColumn > columns, GUITableEntry tableEntry, float availableWidth)
 
void RightClickMenu (List< TableColumn > columns, Rect? position=null)
 
void ResizeColumn (List< TableColumn > columns, int indexColumn, float currentX, Rect? position=null)
 

Static Public Member Functions

static GUITableState Load (string prefsKey)
 

Public Attributes

Vector2 scrollPos
 
int sortByColumnIndex = -1
 
bool sortIncreasing
 
List< float > columnSizes = new List<float> ()
 
List< float > absoluteColumnSizes = new List<float> ()
 
List< float > columnRelativeSizes = new List<float> ()
 
List< bool > columnVisible = new List<bool> ()
 
ReorderableList reorderableList
 

Properties

bool isBeingResized [get]
 
float totalWidth [get]
 

Detailed Description

The current state of the GUITable. This has to be used the same way state parameters are used in Unity GUI functions, like the scroll position in BeginScrollView. It has to be passed from one GUI frame to another by keeping a reference in your calling code.

GUITableState tableState;
void OnGUI ()
{
tableState = GUITable.DrawTable(collectionProperty, tableState);
}

Constructor & Destructor Documentation

◆ GUITableState()

EditorGUITable.GUITableState.GUITableState ( string  prefsKey)

Initializes a EditorGUITable.GUITableState with a key to save it in EditorPrefs. This constructor can't be used in ScriptableObject's constructor or in the property's declaration, because it uses the EditorPrefs. Use it in OnEnable or Awake instead.

Parameters
prefsKeyPrefs key.

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