A* Pathfinding Project  3.6.6
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 float Berp (float start, float end, float value)
 
static float Coserp (float start, float end, float value)
 
static void EndIndent ()
 End indent.
 
static float Hermite (float start, float end, float value)
 
static int IndentWidth ()
 Returns width of current editor indent.
 
static LayerMask LayerMaskField (string label, LayerMask selected)
 
static LayerMask LayerMaskField (string label, LayerMask selected, bool showSpecial)
 Displays a LayerMask field.
 
static void SetTagField (GUIContent label, ref Pathfinding.TagMask value)
 
static float Sinerp (float start, float end, float value)
 
static int SingleTagField (string label, int value)
 
static void TagsMaskField (GUIContent changeLabel, GUIContent setLabel, ref Pathfinding.TagMask value)
 
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 long lastUpdateTick
 
static string[] layerNames
 
static List< int > layerNumbers
 
static List< string > layers
 
static GUIStyle stretchStyle
 
static GUIStyle stretchStyleThin
 

Private Attributes

Rect fadeAreaRect
 
Dictionary< string, FadeAreafadeAreas
 
Stack< FadeAreafadeAreaStack
 
Rect lastAreaRect
 

Static Private Attributes

static bool fade = true
 
static float speed = 6
 

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

static float Berp ( float  start,
float  end,
float  value 
)
static
void ClearFadeAreaStack ( )

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

static float Coserp ( float  start,
float  end,
float  value 
)
static
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 ( )
static

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
static LayerMask LayerMaskField ( string  label,
LayerMask  selected,
bool  showSpecial 
)
static

Displays a LayerMask field.

Parameters
labelLabel to display
showSpecialUse the Nothing and Everything selections
selectedCurrent LayerMask
Note
Unity 3.5 and up will use the EditorGUILayout.MaskField instead of a custom written one.
void RemoveID ( string  id)
static void SetTagField ( GUIContent  label,
ref Pathfinding.TagMask  value 
)
static
static float Sinerp ( float  start,
float  end,
float  value 
)
static
static int SingleTagField ( string  label,
int  value 
)
static
static void TagsMaskField ( GUIContent  changeLabel,
GUIContent  setLabel,
ref Pathfinding.TagMask  value 
)
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...
bool fade = true
staticprivate
Rect fadeAreaRect
private
Dictionary<string, FadeArea> fadeAreas
private
Stack<FadeArea> fadeAreaStack
private
bool fancyEffects = true
static
Rect lastAreaRect
private
long lastUpdateTick
static
string [] layerNames
static
List<int> layerNumbers
static
List<string> layers
static
float speed = 6
staticprivate
GUIStyle stretchStyle
static
GUIStyle stretchStyleThin
static

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