Static utility class that provides methods for drawing Unity GUI controls.
More...
|
static void | DrawText (Rect rect, string text, GUIStyle guiStyle, TextStyle textStyle=TextStyle.None) |
| Draws a text label using a specified GUI style and text style. More...
|
|
static void | DrawText (Rect rect, string text, GUIStyle guiStyle, TextStyle textStyle, Color textStyleColor) |
| Draws a text label using a specified GUI style and text style. More...
|
|
static GUISkin | GetValidGUISkin (GUISkin guiSkin) |
| Gets the most applicable GUI skin. More...
|
|
static GUISkin | GetDialogueManagerGUISkin () |
| Gets the GUI skin on the DialogueManager's UnityDialogueUI. More...
|
|
static GUIStyle | GetGUIStyle (string guiStyleName, GUIStyle defaultGUIStyle) |
| Using the current skin, gets a named GUI style. More...
|
|
static Color | ColorWithAlpha (Color color, float alpha) |
| Sets the alpha value of a color. More...
|
|
static FontStyle | ApplyBold (FontStyle fontStyle) |
| Returns a font style that has bold applied. More...
|
|
static FontStyle | ApplyItalic (FontStyle fontStyle) |
| Returns a font style that has italics applied. More...
|
|
static GUIStyle | ApplyFormatting (FormattedText formattingToApply, GUIStyle guiStyle) |
| Applies the formatting specified in a FormattedText to a GUI style. More...
|
|
Static utility class that provides methods for drawing Unity GUI controls.
◆ ApplyBold()
static FontStyle PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.ApplyBold |
( |
FontStyle |
fontStyle | ) |
|
|
static |
Returns a font style that has bold applied.
If the font already has italics, the returned style will have bold and italics.
- Returns
- The font style with bold.
- Parameters
-
fontStyle | The original font style. |
◆ ApplyFormatting()
static GUIStyle PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.ApplyFormatting |
( |
FormattedText |
formattingToApply, |
|
|
GUIStyle |
guiStyle |
|
) |
| |
|
static |
Applies the formatting specified in a FormattedText to a GUI style.
If the formatting contains any emphases, currently only applies the first emphasis.
- Returns
- The same GUI style (not a copy) with formatting applied.
- Parameters
-
formattingToApply | Formatting to apply. |
guiStyle | GUI style. |
◆ ApplyItalic()
static FontStyle PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.ApplyItalic |
( |
FontStyle |
fontStyle | ) |
|
|
static |
Returns a font style that has italics applied.
If the font already has bold, the returned style will have bold and italics.
- Returns
- The font style with italics.
- Parameters
-
fontStyle | The original font style. |
◆ ColorWithAlpha()
static Color PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.ColorWithAlpha |
( |
Color |
color, |
|
|
float |
alpha |
|
) |
| |
|
static |
Sets the alpha value of a color.
- Returns
- The specified color, with the alpha value set to the specified alpha.
- Parameters
-
◆ DrawText() [1/2]
static void PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.DrawText |
( |
Rect |
rect, |
|
|
string |
text, |
|
|
GUIStyle |
guiStyle, |
|
|
TextStyle |
textStyle, |
|
|
Color |
textStyleColor |
|
) |
| |
|
static |
Draws a text label using a specified GUI style and text style.
- Parameters
-
rect | Rect where the label will be drawn. |
text | Text to draw. |
guiStyle | GUI style. |
textStyle | Text style. |
textStyleColor | Text style color used for outlines and drop shadows. |
◆ DrawText() [2/2]
static void PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.DrawText |
( |
Rect |
rect, |
|
|
string |
text, |
|
|
GUIStyle |
guiStyle, |
|
|
TextStyle |
textStyle = TextStyle.None |
|
) |
| |
|
static |
Draws a text label using a specified GUI style and text style.
- Parameters
-
rect | Rect where the label will be drawn. |
text | Text to draw. |
guiStyle | GUI style. |
textStyle | Text style. |
◆ GetDialogueManagerGUISkin()
static GUISkin PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.GetDialogueManagerGUISkin |
( |
| ) |
|
|
static |
◆ GetGUIStyle()
static GUIStyle PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.GetGUIStyle |
( |
string |
guiStyleName, |
|
|
GUIStyle |
defaultGUIStyle |
|
) |
| |
|
static |
Using the current skin, gets a named GUI style.
- Returns
- A copy of the GUI style named by guiStyleName, or defaultGUIStyle if the named style doesn't exist in the current skin. Since this is a copy, you can modify it without affecting the original.
- Parameters
-
guiStyleName | GUI style name. |
defaultGUIStyle | Default GUI style to use if the named style doesn't exist. |
◆ GetValidGUISkin()
static GUISkin PixelCrushers.DialogueSystem.UnityGUI.UnityGUITools.GetValidGUISkin |
( |
GUISkin |
guiSkin | ) |
|
|
static |
Gets the most applicable GUI skin.
It first tries the specified guiSkin, then the DialogueManager's UnityDialogueUI's skin if applicable, then the default skin.
- Returns
- A valid (non-null) GUI skin.
- Parameters
-
guiSkin | The first GUI skin to try. |
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Source/Assets/Dialogue System/Scripts/Supplemental/Unity GUI/GUI Controls/Tools/UnityGUITools.cs