A* Pathfinding Project  3.8
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
EditorGUILayoutx Class Reference

Handles fading effects and also some custom GUI functions such as LayerMaskField. More...

Detailed Description

Handles fading effects and also some custom GUI functions such as LayerMaskField.

Warning
The code is not pretty.

Classes

class  FadeArea
 

Public Member Functions

FadeArea BeginFadeArea (bool open, string label, string id)
 
FadeArea BeginFadeArea (bool open, string label, string id, GUIStyle areaStyle)
 
FadeArea BeginFadeArea (bool open, string label, string id, GUIStyle areaStyle, GUIStyle labelStyle)
 
FadeArea BeginFadeArea (bool open, string id)
 
FadeArea BeginFadeArea (bool open, string id, float minHeight)
 
FadeArea BeginFadeArea (bool open, string id, float minHeight, GUIStyle areaStyle)
 
void ClearFadeAreaStack ()
 Make sure the stack is cleared at the start of a frame.
 
bool DrawID (string id)
 
void EndFadeArea ()
 
void RemoveID (string id)
 

Static Public Member Functions

static void BeginIndent ()
 Begin horizontal indent for the next control.
 
static void EndIndent ()
 End indent.
 
static float Hermite (float start, float end, float value)
 
static LayerMask LayerMaskField (string label, LayerMask selected)
 Displays a LayerMask field.
 
static int TagField (string label, int value)
 
static void TagMaskField (GUIContent label, int value, System.Action< int > callback)
 
static bool UnityTagMaskList (GUIContent label, bool foldout, List< string > tagMask)
 
static int UpDownArrows (GUIContent label, int value, GUIStyle labelStyle, GUIStyle upArrow, GUIStyle downArrow)
 

Static Public Attributes

static GUIStyle defaultAreaStyle
 
static GUIStyle defaultLabelStyle
 
static Editor editor
 Global info about which editor is currently active.
 
static bool fancyEffects = true
 

Static Private Member Functions

static int IndentWidth ()
 Returns width of current editor indent.
 

Private Attributes

readonly bool fade = true
 
Dictionary< string, FadeAreafadeAreas
 
Stack< FadeAreafadeAreaStack
 
const float speed = 8
 

Static Private Attributes

static long lastUpdateTick
 
static string[] layerNames
 
static List< string > layers
 
static string[] tagNamesAndEditTagsButton
 Tag names and an additional 'Edit Tags...' entry.
 
static double timeLastUpdatedTagNames
 Last tiem tagNamesAndEditTagsButton was updated.
 

Member Function Documentation

FadeArea BeginFadeArea ( bool  open,
string  label,
string  id 
)
FadeArea BeginFadeArea ( bool  open,
string  label,
string  id,
GUIStyle  areaStyle 
)
FadeArea BeginFadeArea ( bool  open,
string  label,
string  id,
GUIStyle  areaStyle,
GUIStyle  labelStyle 
)
FadeArea BeginFadeArea ( bool  open,
string  id 
)
FadeArea BeginFadeArea ( bool  open,
string  id,
float  minHeight 
)
FadeArea BeginFadeArea ( bool  open,
string  id,
float  minHeight,
GUIStyle  areaStyle 
)
static void BeginIndent ( )
static

Begin horizontal indent for the next control.

Fake "real" indent when using EditorGUIUtility.LookLikeControls.
Forumula used is 13+6*EditorGUI.indentLevel

void ClearFadeAreaStack ( )

Make sure the stack is cleared at the start of a frame.

bool DrawID ( string  id)
void EndFadeArea ( )
static void EndIndent ( )
static

End indent.

Actually just a EndHorizontal call.

See Also
BeginIndent
static float Hermite ( float  start,
float  end,
float  value 
)
static
static int IndentWidth ( )
staticprivate

Returns width of current editor indent.

Unity seems to use 13+6*EditorGUI.indentLevel in U3 and 15*indent - (indent > 1 ? 2 : 0) or something like that in U4

static LayerMask LayerMaskField ( string  label,
LayerMask  selected 
)
static

Displays a LayerMask field.

Parameters
labelLabel to display
selectedCurrent LayerMask
Note
Unity 3.5 and up will use the EditorGUILayout.MaskField instead of a custom written one.
void RemoveID ( string  id)
static int TagField ( string  label,
int  value 
)
static
static void TagMaskField ( GUIContent  label,
int  value,
System.Action< int >  callback 
)
static
static bool UnityTagMaskList ( GUIContent  label,
bool  foldout,
List< string >  tagMask 
)
static
static int UpDownArrows ( GUIContent  label,
int  value,
GUIStyle  labelStyle,
GUIStyle  upArrow,
GUIStyle  downArrow 
)
static

Member Data Documentation

GUIStyle defaultAreaStyle
static
GUIStyle defaultLabelStyle
static
Editor editor
static

Global info about which editor is currently active.

Todo:
Ugly, rewrite this class at some point...
readonly bool fade = true
private
Dictionary<string, FadeArea> fadeAreas
private
Stack<FadeArea> fadeAreaStack
private
bool fancyEffects = true
static
long lastUpdateTick
staticprivate
string [] layerNames
staticprivate
List<string> layers
staticprivate
const float speed = 8
private
string [] tagNamesAndEditTagsButton
staticprivate

Tag names and an additional 'Edit Tags...' entry.

Used for SingleTagField

double timeLastUpdatedTagNames
staticprivate

Last tiem tagNamesAndEditTagsButton was updated.

Uses EditorApplication.timeSinceStartup


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