Chloroplast Games Framework
Assets.CGF.Editor.CGFGUIHelper Class Reference

Set of functionalities to create buttons in the Editor UI. More...

Static Public Member Functions

static void DrawTexture (Rect position, Texture2D texture)
 Draws the selected texture More...
 
static bool IconButton (Rect position, bool visible, GUIContent iconNormal, GUIContent iconActive)
 Create an UI Button icon. More...
 
static bool IconButton2 (Rect position, bool visible, GUIContent iconNormal, GUIContent iconActive)
 Create an UI Button icon. More...
 
static bool IconButton (Rect position, GUIContent iconNormal, GUIContent iconActive)
 Create an UI Button. More...
 
static bool IconButton2 (Rect position, GUIContent iconNormal, GUIContent iconActive)
 Create an UI Button. More...
 
static void Separator (Rect position, Color color)
 Creates a separator. More...
 
static void Separator (Rect position)
 Creates a separator. More...
 

Static Public Attributes

static GUIContent _temporalIconContent = new GUIContent()
 GuiContent Unity Personal Button. More...
 
static GUIContent _temporalIconContentProfessional = new GUIContent()
 GuiContent Unity Professional Button. More...
 

Static Private Attributes

static Func< Rect > VisibleRect
 Rectanle area to build the separator. More...
 
static GUIStyle _temporalStyle = new GUIStyle()
 GUI Style. More...
 
static readonly int _iconButtonHint = "_ReorderableIconButton_".GetHashCode()
 Integer button identifier. More...
 
static readonly Color _separatorColor = EditorGUIUtility.isProSkin ? new Color(0.11f, 0.11f, 0.11f) : new Color(0.5f, 0.5f, 0.5f)
 Separator space color. More...
 
static readonly GUIStyle _separatorStyle = new GUIStyle()
 Separator GUI Style. More...
 

Detailed Description

Set of functionalities to create buttons in the Editor UI.

Member Function Documentation

static void Assets.CGF.Editor.CGFGUIHelper.DrawTexture ( Rect  position,
Texture2D  texture 
)
static

Draws the selected texture

Parameters
positionTexture position.
textureTexture to draw.
static bool Assets.CGF.Editor.CGFGUIHelper.IconButton ( Rect  position,
bool  visible,
GUIContent  iconNormal,
GUIContent  iconActive 
)
static

Create an UI Button icon.

Parameters
positionButton position.
visibleIs the icon visible?.
iconNormalNormal status button image.
iconActivePressed status button image.
Returns
Result boolean.
static bool Assets.CGF.Editor.CGFGUIHelper.IconButton ( Rect  position,
GUIContent  iconNormal,
GUIContent  iconActive 
)
static

Create an UI Button.

Parameters
positionButton position.
iconNormalNormal status button image.
iconActivePressed status button image.
Returns
Boolean result.
static bool Assets.CGF.Editor.CGFGUIHelper.IconButton2 ( Rect  position,
bool  visible,
GUIContent  iconNormal,
GUIContent  iconActive 
)
static

Create an UI Button icon.

Parameters
positionButton position.
visibleIs the icon visible?.
iconNormalNormal status button image.
iconActivePressed status button image.
Returns
Result boolean.
static bool Assets.CGF.Editor.CGFGUIHelper.IconButton2 ( Rect  position,
GUIContent  iconNormal,
GUIContent  iconActive 
)
static

Create an UI Button.

Parameters
positionButton position.
iconNormalNormal status button image.
iconActivePressed status button image.
Returns
Boolean result.
static void Assets.CGF.Editor.CGFGUIHelper.Separator ( Rect  position,
Color  color 
)
static

Creates a separator.

Parameters
positionSeparator position.
colorSeparator Color.
static void Assets.CGF.Editor.CGFGUIHelper.Separator ( Rect  position)
static

Creates a separator.

Parameters
positionSeparator position.

Member Data Documentation

readonly int Assets.CGF.Editor.CGFGUIHelper._iconButtonHint = "_ReorderableIconButton_".GetHashCode()
staticprivate

Integer button identifier.

readonly Color Assets.CGF.Editor.CGFGUIHelper._separatorColor = EditorGUIUtility.isProSkin ? new Color(0.11f, 0.11f, 0.11f) : new Color(0.5f, 0.5f, 0.5f)
staticprivate

Separator space color.

readonly GUIStyle Assets.CGF.Editor.CGFGUIHelper._separatorStyle = new GUIStyle()
staticprivate

Separator GUI Style.

GUIContent Assets.CGF.Editor.CGFGUIHelper._temporalIconContent = new GUIContent()
static

GuiContent Unity Personal Button.

GUIContent Assets.CGF.Editor.CGFGUIHelper._temporalIconContentProfessional = new GUIContent()
static

GuiContent Unity Professional Button.

GUIStyle Assets.CGF.Editor.CGFGUIHelper._temporalStyle = new GUIStyle()
staticprivate

GUI Style.

Func<Rect> Assets.CGF.Editor.CGFGUIHelper.VisibleRect
staticprivate

Rectanle area to build the separator.


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