DemiLib
A collection of Demigiant's utility libraries for Unity (https://github.com/Demigiant/demilib)
DG.DemiEditor.DeGUI Class Reference

Global Demigiant GUI manager. Call DeGUI.BeginGUI to initialize it inside GUI calls. More...

Static Public Member Functions

static void BeginGUI (DeColorPalette guiColorPalette=null, DeStylePalette guiStylePalette=null)
 Call this at the beginning of GUI methods More...
 
static void Box (Rect rect, Color color, GUIStyle style=null)
 Box with style and color options More...
 
static void ChangePalette (DeColorPalette newColorPalette, DeStylePalette newStylePalette)
 Changes the active palettes to the given ones (or resets them to the default ones if NULL) More...
 
static bool ColoredButton (Rect rect, Color shade, Color contentColor, string text)
 Colored button More...
 
static bool ColoredButton (Rect rect, Color shade, Color contentColor, string text, GUIStyle guiStyle)
 Colored button More...
 
static bool ColoredButton (Rect rect, Color shade, Color contentColor, GUIContent content)
 Colored button More...
 
static bool ColoredButton (Rect rect, Color shade, Color contentColor, GUIContent content, GUIStyle guiStyle)
 Colored button More...
 
static string DoubleClickDraggableTextField (Rect rect, EditorWindow editorWindow, string id, string text, int dragId, IList draggableList, int draggedItemIndex, GUIStyle defaultStyle=null, GUIStyle editingStyle=null)
 A text field that becomes editable only on double-click and can also be dragged More...
 
static string DoubleClickDraggableTextField (Rect rect, Editor editor, string id, string text, int dragId, IList draggableList, int draggedItemIndex, GUIStyle defaultStyle=null, GUIStyle editingStyle=null)
 A text field that becomes editable only on double-click and can also be dragged More...
 
static string DoubleClickTextField (Rect rect, EditorWindow editorWindow, string id, string text, GUIStyle defaultStyle=null, GUIStyle editingStyle=null)
 A text field that becomes editable only on double-click More...
 
static string DoubleClickTextField (Rect rect, Editor editor, string id, string text, GUIStyle defaultStyle=null, GUIStyle editingStyle=null)
 A text field that becomes editable only on double-click More...
 
static void DrawColoredSquare (Rect rect, Color color)
 Draws a colored square More...
 
static void ExitCurrentEvent ()
 Exits the current event correctly, also taking care of eventual drag operations More...
 
static void FlatDivider (Rect rect, Color?color=null)
 Divider More...
 
static bool PressButton (Rect rect, string text, GUIStyle guiStyle)
 Draws a button that returns TRUE the first time it's pressed, instead than when its released. More...
 
static bool PressButton (Rect rect, GUIContent content, GUIStyle guiStyle)
 Draws a button that returns TRUE the first time it's pressed, instead than when its released. More...
 
static void ResetGUIColors (bool resetBackground=true, bool resetContent=true, bool resetMain=true)
 Resets the GUI colors to the default ones (only available if BeginGUI was called first) More...
 
static Object SceneField (Rect rect, string label, Object obj)
 Scene field More...
 
static void SetGUIColors (Color?background, Color?content, Color?main)
 Sets the GUI colors to the given ones More...
 
static bool ShadedButton (Rect rect, Color shade, string text)
 Shaded button More...
 
static bool ShadedButton (Rect rect, Color shade, string text, GUIStyle guiStyle)
 Shaded button More...
 
static bool ShadedButton (Rect rect, Color shade, GUIContent content)
 Shaded button More...
 
static bool ShadedButton (Rect rect, Color shade, GUIContent content, GUIStyle guiStyle)
 Shaded button More...
 
static bool ToggleButton (Rect rect, bool toggled, string text)
 Button that can be toggled on and off More...
 
static bool ToggleButton (Rect rect, bool toggled, string text, GUIStyle guiStyle)
 Button that can be toggled on and off More...
 
static bool ToggleButton (Rect rect, bool toggled, string text, DeColorPalette colorPalette, GUIStyle guiStyle=null)
 Button that can be toggled on and off More...
 
static bool ToggleButton (Rect rect, bool toggled, GUIContent content)
 Button that can be toggled on and off More...
 
static bool ToggleButton (Rect rect, bool toggled, GUIContent content, GUIStyle guiStyle)
 Button that can be toggled on and off More...
 
static bool ToggleButton (Rect rect, bool toggled, GUIContent content, DeColorPalette colorPalette, GUIStyle guiStyle=null)
 Button that can be toggled on and off More...
 

Static Public Attributes

static DeColorPalette colors
 Default color palette More...
 
static Color defaultGUIColor
 
static readonly bool IsProSkin
 TRUE if we're using the PRO skin More...
 
static DeStylePalette styles
 Default style palette More...
 

Detailed Description

Global Demigiant GUI manager. Call DeGUI.BeginGUI to initialize it inside GUI calls.

Member Function Documentation

static void DG.DemiEditor.DeGUI.BeginGUI ( DeColorPalette  guiColorPalette = null,
DeStylePalette  guiStylePalette = null 
)
static

Call this at the beginning of GUI methods

Parameters
guiColorPaletteEventual DeColorPalette to use
guiStylePaletteEventual DeStylePalette to use
static void DG.DemiEditor.DeGUI.Box ( Rect  rect,
Color  color,
GUIStyle  style = null 
)
static

Box with style and color options

static void DG.DemiEditor.DeGUI.ChangePalette ( DeColorPalette  newColorPalette,
DeStylePalette  newStylePalette 
)
static

Changes the active palettes to the given ones (or resets them to the default ones if NULL)

static bool DG.DemiEditor.DeGUI.ColoredButton ( Rect  rect,
Color  shade,
Color  contentColor,
string  text 
)
static

Colored button

static bool DG.DemiEditor.DeGUI.ColoredButton ( Rect  rect,
Color  shade,
Color  contentColor,
string  text,
GUIStyle  guiStyle 
)
static

Colored button

static bool DG.DemiEditor.DeGUI.ColoredButton ( Rect  rect,
Color  shade,
Color  contentColor,
GUIContent  content 
)
static

Colored button

static bool DG.DemiEditor.DeGUI.ColoredButton ( Rect  rect,
Color  shade,
Color  contentColor,
GUIContent  content,
GUIStyle  guiStyle 
)
static

Colored button

static string DG.DemiEditor.DeGUI.DoubleClickDraggableTextField ( Rect  rect,
EditorWindow  editorWindow,
string  id,
string  text,
int  dragId,
IList  draggableList,
int  draggedItemIndex,
GUIStyle  defaultStyle = null,
GUIStyle  editingStyle = null 
)
static

A text field that becomes editable only on double-click and can also be dragged

Parameters
rectArea
editorWindowEditorWindow reference
idA unique ID to use in order to determine if the text is selected or not
textText
dragIdID for this drag operation (must be the same for both this and Drag
draggableListList containing the dragged item and all other relative draggable items
draggedItemIndexDraggableList index of the item being dragged
defaultStyleStyle for default (non-editing mode) appearance
editingStyleStyle for editing mode
Returns
static string DG.DemiEditor.DeGUI.DoubleClickDraggableTextField ( Rect  rect,
Editor  editor,
string  id,
string  text,
int  dragId,
IList  draggableList,
int  draggedItemIndex,
GUIStyle  defaultStyle = null,
GUIStyle  editingStyle = null 
)
static

A text field that becomes editable only on double-click and can also be dragged

Parameters
rectArea
editorEditor reference
idA unique ID to use in order to determine if the text is selected or not
textText
dragIdID for this drag operation (must be the same for both this and Drag
draggableListList containing the dragged item and all other relative draggable items
draggedItemIndexDraggableList index of the item being dragged
defaultStyleStyle for default (non-editing mode) appearance
editingStyleStyle for editing mode
Returns
static string DG.DemiEditor.DeGUI.DoubleClickTextField ( Rect  rect,
EditorWindow  editorWindow,
string  id,
string  text,
GUIStyle  defaultStyle = null,
GUIStyle  editingStyle = null 
)
static

A text field that becomes editable only on double-click

Parameters
rectArea
editorWindowEditorWindow reference
idA unique ID to use in order to determine if the text is selected or not
textText
defaultStyleStyle for default (non-editing mode) appearance
editingStyleStyle for editing mode
static string DG.DemiEditor.DeGUI.DoubleClickTextField ( Rect  rect,
Editor  editor,
string  id,
string  text,
GUIStyle  defaultStyle = null,
GUIStyle  editingStyle = null 
)
static

A text field that becomes editable only on double-click

Parameters
rectArea
editorEditor reference
idA unique ID to use in order to determine if the text is selected or not
textText
defaultStyleStyle for default (non-editing mode) appearance
editingStyleStyle for editing mode
static void DG.DemiEditor.DeGUI.DrawColoredSquare ( Rect  rect,
Color  color 
)
static

Draws a colored square

static void DG.DemiEditor.DeGUI.ExitCurrentEvent ( )
static

Exits the current event correctly, also taking care of eventual drag operations

static void DG.DemiEditor.DeGUI.FlatDivider ( Rect  rect,
Color?  color = null 
)
static

Divider

static bool DG.DemiEditor.DeGUI.PressButton ( Rect  rect,
string  text,
GUIStyle  guiStyle 
)
static

Draws a button that returns TRUE the first time it's pressed, instead than when its released.

static bool DG.DemiEditor.DeGUI.PressButton ( Rect  rect,
GUIContent  content,
GUIStyle  guiStyle 
)
static

Draws a button that returns TRUE the first time it's pressed, instead than when its released.

static void DG.DemiEditor.DeGUI.ResetGUIColors ( bool  resetBackground = true,
bool  resetContent = true,
bool  resetMain = true 
)
static

Resets the GUI colors to the default ones (only available if BeginGUI was called first)

static Object DG.DemiEditor.DeGUI.SceneField ( Rect  rect,
string  label,
Object  obj 
)
static

Scene field

static void DG.DemiEditor.DeGUI.SetGUIColors ( Color?  background,
Color?  content,
Color?  main 
)
static

Sets the GUI colors to the given ones

static bool DG.DemiEditor.DeGUI.ShadedButton ( Rect  rect,
Color  shade,
string  text 
)
static

Shaded button

static bool DG.DemiEditor.DeGUI.ShadedButton ( Rect  rect,
Color  shade,
string  text,
GUIStyle  guiStyle 
)
static

Shaded button

static bool DG.DemiEditor.DeGUI.ShadedButton ( Rect  rect,
Color  shade,
GUIContent  content 
)
static

Shaded button

static bool DG.DemiEditor.DeGUI.ShadedButton ( Rect  rect,
Color  shade,
GUIContent  content,
GUIStyle  guiStyle 
)
static

Shaded button

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
string  text 
)
static

Button that can be toggled on and off

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
string  text,
GUIStyle  guiStyle 
)
static

Button that can be toggled on and off

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
string  text,
DeColorPalette  colorPalette,
GUIStyle  guiStyle = null 
)
static

Button that can be toggled on and off

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
GUIContent  content 
)
static

Button that can be toggled on and off

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
GUIContent  content,
GUIStyle  guiStyle 
)
static

Button that can be toggled on and off

static bool DG.DemiEditor.DeGUI.ToggleButton ( Rect  rect,
bool  toggled,
GUIContent  content,
DeColorPalette  colorPalette,
GUIStyle  guiStyle = null 
)
static

Button that can be toggled on and off

Button that can be toggled on and off

Member Data Documentation

DeColorPalette DG.DemiEditor.DeGUI.colors
static

Default color palette

Color DG.DemiEditor.DeGUI.defaultGUIColor
static
readonly bool DG.DemiEditor.DeGUI.IsProSkin
static

TRUE if we're using the PRO skin

DeStylePalette DG.DemiEditor.DeGUI.styles
static

Default style palette


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