Summary
[Editor-Only] Various GUI utilities used throughout Animancer.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Editor - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["AnimancerGUI"]
class Type type-node
Syntax
public static class AnimancerGUI
Fields
Name | Constant Value | Summary |
---|---|---|
DontExpandWidth |
UnityEngine.GUILayout.ExpandWidth(System.Boolean) set to false.static
|
|
ErrorFieldColor |
The highlight color used for fields showing an error.
static
|
|
WarningFieldColor |
The highlight color used for fields showing a warning.
static
|
Properties
Name | Value | Summary |
---|---|---|
IndentSize | float |
The number of pixels of indentation for each
UnityEditor.EditorGUI.indentLevel increment.
static
|
LineHeight | float |
Returns
UnityEditor.EditorGUIUtility.singleLineHeight .static
|
MiniButton | GUIStyle |
A more compact
UnityEditor.EditorStyles.miniButton with a fixed size as a tiny box.static
|
PauseButtonContent | GUIContent |
Animancer.Editor.AnimancerGUI.IconContent(UnityEngine.GUIContent@,System.String) for a pause button.static
|
PlayButtonContent | GUIContent |
Animancer.Editor.AnimancerGUI.IconContent(UnityEngine.GUIContent@,System.String) for a play button.static
|
PlayButtonWidth | float |
The default width of
Animancer.Editor.AnimancerGUI.PlayButtonContent using UnityEditor.EditorStyles.miniButton .static
|
StandardSpacing | float |
Returns
UnityEditor.EditorGUIUtility.standardVerticalSpacing .static
|
Step |
GUIContent |
Animancer.Editor.AnimancerGUI.IconContent(UnityEngine.GUIContent@,System.String) for a step backward button.static
|
Step |
GUIContent |
Animancer.Editor.AnimancerGUI.IconContent(UnityEngine.GUIContent@,System.String) for a step forward button.static
|
TextColor | Color |
The color of the standard label text.
static
|
ToggleWidth | float |
The width of a standard
UnityEngine.GUISkin.toggle with no label.static
|
Methods
Name | Value | Summary |
---|---|---|
BeginTightLabel |
string |
Stores the
UnityEditor.EditorGUIUtility.labelWidth and changes it to the exact width of the `label`.static
|
BeginVerticalBox |
void |
Begins a vertical layout group using the given style and decreases the
UnityEditor.EditorGUIUtility.labelWidth to compensate for the indentation.
static
|
CalculateLabelWidth |
float |
Calls
UnityEngine.GUIStyle.CalcMinMaxWidth(UnityEngine.GUIContent,System.Single@,System.Single@) using UnityEngine.GUISkin.label and returns the max
width. The result is cached for efficient reuse.
static
|
CalculateWidth |
float |
[Animancer Extension] Calls
UnityEngine.GUIStyle.CalcMinMaxWidth(UnityEngine.GUIContent,System.Single@,System.Single@) and returns the max width.static
|
CalculateWidth |
float |
[Animancer Extension] Calls
UnityEngine.GUIStyle.CalcMinMaxWidth(UnityEngine.GUIContent,System.Single@,System.Single@) and returns the max width.static
|
CompactMiniButton |
bool |
Draws a button using
UnityEditor.EditorStyles.miniButton and Animancer.Editor.AnimancerGUI.DontExpandWidth .static
|
CompactMiniButton |
bool |
Draws a button using
UnityEditor.EditorStyles.miniButton .static
|
CreateWidthCache |
ConversionCache |
Creates a
Animancer.Editor.ConversionCache`2 for calculating the GUI width occupied by text using the
specified `style`.
static
|
Deselect |
void |
Deselects any selected IMGUI control.
static
|
DoWeightLabel |
void |
Draws a label showing the `weight` aligned to the right side of the `area` and reduces its
UnityEngine.Rect.width to remove that label from its area.
static
|
EndTightLabel |
void |
Reverts
UnityEditor.EditorGUIUtility.labelWidth to its previous value.static
|
EndVerticalBox |
void |
Ends a layout group started by
Animancer.Editor.AnimancerGUI.BeginVerticalBox(UnityEngine.GUIStyle) and restores the
UnityEditor.EditorGUIUtility.labelWidth .
static
|
GetNarrowText |
string |
Returns the `text` without any spaces if
UnityEditor.EditorGUIUtility.wideMode is false.
Otherwise simply returns the `text` without any changes.
static
|
HandleDragAndDrop |
void |
Invokes `onDrop` if the
UnityEngine.Event.current is a drag and drop event inside the `dropArea`.
static
|
Handle |
void |
Uses
Animancer.Editor.AnimancerGUI.HandleDragAndDrop``1(UnityEngine.Rect,System.Func{``0,System.Boolean},System.Action{``0},UnityEditor.DragAndDropVisualMode) to deal with drag and drop operations involving
UnityEngine.AnimationClip s of UnityEngine.IAnimationClipSource s.
static
|
IconContent |
GUIContent |
Calls
UnityEditor.EditorGUIUtility.IconContent(System.String) if the `content` was null.static
|
LayoutSingleLineRect |
Rect |
Uses
UnityEngine.GUILayoutUtility.GetRect(System.Single,System.Single) to get a UnityEngine.Rect occupying a single
standard line with the Animancer.Editor.AnimancerGUI.StandardSpacing added according to the specified `spacing`.
static
|
LoadIcon |
Texture |
Loads an icon texture and sets it to use
UnityEngine.FilterMode.Bilinear .static
|
NextVerticalArea |
void |
If the
UnityEngine.Rect.height is positive, this method moves the UnityEngine.Rect.y by that amount and
adds the UnityEditor.EditorGUIUtility.standardVerticalSpacing .
static
|
RepaintEverything |
void |
Calls
UnityEditorInternal.InternalEditorUtility.RepaintAllViews .static
|
Re |
void |
Clears the
UnityEditor.Selection.objects then returns it to its current state.static
|
SplitHorizontally |
void |
Divides the given `area` such that the fields associated with both labels will have equal space
remaining after the labels themselves.
static
|
StealFromLeft |
Rect |
Subtracts the `width` from the left side of the `area` and returns a new
UnityEngine.Rect occupying the
removed section.
static
|
StealFromRight |
Rect |
Subtracts the `width` from the right side of the `area` and returns a new
UnityEngine.Rect occupying the
removed section.
static
|
TryUseClickEvent |
bool |
Returns true and uses the current event if it is
UnityEngine.EventType.MouseUp inside the specified
`area`.
static
|
Try |
bool |
Returns true and uses the current event if it is
UnityEngine.EventType.MouseUp inside the last GUI Layout
UnityEngine.Rect that was drawn.
static
|