Class GUIHelper
Utility functions to assist with GUIs.
Inheritance
object
GUIHelper
Namespace: Unity.VisualScripting.ReorderableList.Internal
Assembly: solution.dll
Syntax
public static class GUIHelper
Fields
FocusTextInControl
Focus control and text editor where applicable.
Declaration
public static Action<string> FocusTextInControl
Field Value
| Type | Description |
|---|---|
| Action<string> |
VisibleRect
Gets visible rectangle within GUI.
Declaration
public static Func<Rect> VisibleRect
Field Value
| Type | Description |
|---|---|
| Func<Rect> |
Remarks
VisibleRect = TopmostRect + scrollViewOffsets
Methods
DrawTexture(Rect, Texture2D)
Draw texture using GUIStyle to workaround bug in Unity where DrawTexture(Rect,Texture) flickers when embedded inside a property drawer.
Declaration
public static void DrawTexture(Rect position, Texture2D texture)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | Position of which to draw texture in space of GUI. |
| Texture2D | texture | Texture. |
IconButton(Rect, bool, Texture2D, Texture2D, GUIStyle)
Declaration
public static bool IconButton(Rect position, bool visible, Texture2D iconNormal, Texture2D iconActive, GUIStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | |
| bool | visible | |
| Texture2D | iconNormal | |
| Texture2D | iconActive | |
| GUIStyle | style |
Returns
| Type | Description |
|---|---|
| bool |
IconButton(Rect, Texture2D, Texture2D, GUIStyle)
Declaration
public static bool IconButton(Rect position, Texture2D iconNormal, Texture2D iconActive, GUIStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | |
| Texture2D | iconNormal | |
| Texture2D | iconActive | |
| GUIStyle | style |
Returns
| Type | Description |
|---|---|
| bool |
Separator(Rect)
Declaration
public static void Separator(Rect position)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position |
Separator(Rect, Color)
Declaration
public static void Separator(Rect position, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | position | |
| Color | color |