Search Results for

    Show / Hide Table of Contents

    Class DewGUI

    Helper class for building custom GUIs.

    Inheritance
    object
    DewGUI
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    public static class DewGUI

    Fields

    fieldBuilders

    Declaration
    public static List<(DewGUI.FieldBuilderCondition, DewGUI.FieldBuilder)> fieldBuilders
    Field Value
    Type Description
    System.Collections.Generic.List<T><(DewGUI.FieldBuilderCondition, DewGUI.FieldBuilder)>

    SupportedBasicTypes

    Declaration
    public static readonly Type[] SupportedBasicTypes
    Field Value
    Type Description
    System.Type[]

    Properties

    canvasTransform

    Declaration
    public static RectTransform canvasTransform { get; }
    Property Value
    Type Description
    UnityEngine.RectTransform

    widgetBindItem

    Declaration
    public static UI_BindItem widgetBindItem { get; }
    Property Value
    Type Description
    UI_BindItem

    widgetButton

    Declaration
    public static Button widgetButton { get; }
    Property Value
    Type Description
    UnityEngine.UI.Button

    widgetDropdown

    Declaration
    public static TMP_Dropdown widgetDropdown { get; }
    Property Value
    Type Description
    TMPro.TMP_Dropdown

    widgetInputField

    Declaration
    public static TMP_InputField widgetInputField { get; }
    Property Value
    Type Description
    TMPro.TMP_InputField

    widgetScrollRect

    Declaration
    public static ScrollRect widgetScrollRect { get; }
    Property Value
    Type Description
    UnityEngine.UI.ScrollRect

    widgetSlider

    Declaration
    public static Slider widgetSlider { get; }
    Property Value
    Type Description
    UnityEngine.UI.Slider

    widgetTextBody

    Declaration
    public static TextMeshProUGUI widgetTextBody { get; }
    Property Value
    Type Description
    TMPro.TextMeshProUGUI

    widgetTextHeader

    Declaration
    public static TextMeshProUGUI widgetTextHeader { get; }
    Property Value
    Type Description
    TMPro.TextMeshProUGUI

    widgetTextLabel

    Declaration
    public static TextMeshProUGUI widgetTextLabel { get; }
    Property Value
    Type Description
    TMPro.TextMeshProUGUI

    widgetToggleButton

    Declaration
    public static UI_Toggle widgetToggleButton { get; }
    Property Value
    Type Description
    UI_Toggle

    widgetToggleCheck

    Declaration
    public static UI_Toggle widgetToggleCheck { get; }
    Property Value
    Type Description
    UI_Toggle

    widgetWindow

    The window comes with VerticalLayoutGroup and ContentSizeFitter, and is draggable by default.

    Declaration
    public static UI_Window widgetWindow { get; }
    Property Value
    Type Description
    UI_Window

    Methods

    ApplyLayoutGroupDefaultSettings(HorizontalLayoutGroup, TextAnchor)

    Helper for creating layout groups with nice default values.

    Declaration
    public static void ApplyLayoutGroupDefaultSettings(HorizontalLayoutGroup group, TextAnchor alignment = TextAnchor.MiddleLeft)
    Parameters
    Type Name Description
    UnityEngine.UI.HorizontalLayoutGroup group
    UnityEngine.TextAnchor alignment

    ApplyLayoutGroupDefaultSettings(VerticalLayoutGroup, TextAnchor)

    Helper for creating layout groups with nice default values.

    Declaration
    public static void ApplyLayoutGroupDefaultSettings(VerticalLayoutGroup group, TextAnchor alignment = TextAnchor.UpperCenter)
    Parameters
    Type Name Description
    UnityEngine.UI.VerticalLayoutGroup group
    UnityEngine.TextAnchor alignment

    CreateHorizontalFlexibleSpace(Transform)

    Declaration
    public static LayoutElement CreateHorizontalFlexibleSpace(Transform parent)
    Parameters
    Type Name Description
    UnityEngine.Transform parent
    Returns
    Type Description
    UnityEngine.UI.LayoutElement

    CreateHorizontalLayoutGroup(Transform, TextAnchor)

    Helper for creating layout groups with nice default values.

    Declaration
    public static HorizontalLayoutGroup CreateHorizontalLayoutGroup(Transform parent, TextAnchor alignment = TextAnchor.MiddleLeft)
    Parameters
    Type Name Description
    UnityEngine.Transform parent
    UnityEngine.TextAnchor alignment
    Returns
    Type Description
    UnityEngine.UI.HorizontalLayoutGroup

    CreateVerticalFlexibleSpace(Transform)

    Declaration
    public static LayoutElement CreateVerticalFlexibleSpace(Transform parent)
    Parameters
    Type Name Description
    UnityEngine.Transform parent
    Returns
    Type Description
    UnityEngine.UI.LayoutElement

    CreateVerticalLayoutGroup(Transform, TextAnchor)

    Helper for creating layout groups with nice default values.

    Declaration
    public static VerticalLayoutGroup CreateVerticalLayoutGroup(Transform parent, TextAnchor alignment = TextAnchor.UpperCenter)
    Parameters
    Type Name Description
    UnityEngine.Transform parent
    UnityEngine.TextAnchor alignment
    Returns
    Type Description
    UnityEngine.UI.VerticalLayoutGroup

    CreateWidgetsForObject(Type, object, Transform, out SafeAction, out SafeAction)

    Creates data-bound widgets for given object type.

    Declaration
    public static void CreateWidgetsForObject(Type type, object state, Transform parent, out SafeAction onChanged, out SafeAction requestUpdate)
    Parameters
    Type Name Description
    System.Type type
    object state
    UnityEngine.Transform parent
    SafeAction onChanged
    SafeAction requestUpdate

    GenericInputFieldBuilder<T>(Transform, TryParseFunc<T>, CharacterValidation, out TMP_InputField)

    Declaration
    public static FieldBuildResult GenericInputFieldBuilder<T>(Transform parent, DewGUI.TryParseFunc<T> tryParse, TMP_InputField.CharacterValidation validation, out TMP_InputField inputField)
    Parameters
    Type Name Description
    UnityEngine.Transform parent
    DewGUI.TryParseFunc<T> tryParse
    TMPro.TMP_InputField.TMPro.TMP_InputField.CharacterValidation validation
    TMPro.TMP_InputField inputField
    Returns
    Type Description
    FieldBuildResult
    Type Parameters
    Name Description
    T

    SetExpandHeight(GameObject, bool)

    Declaration
    public static GameObject SetExpandHeight(this GameObject c, bool expand)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    bool expand
    Returns
    Type Description
    UnityEngine.GameObject

    SetExpandHeight(GameObject, float)

    Declaration
    public static GameObject SetExpandHeight(this GameObject c, float value)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    float value
    Returns
    Type Description
    UnityEngine.GameObject

    SetExpandHeight<T>(T, bool)

    Declaration
    public static T SetExpandHeight<T>(this T c, bool expand) where T : Component
    Parameters
    Type Name Description
    T c
    bool expand
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetExpandHeight<T>(T, float)

    Declaration
    public static T SetExpandHeight<T>(this T c, float value) where T : Component
    Parameters
    Type Name Description
    T c
    float value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetExpandWidth(GameObject, bool)

    Declaration
    public static GameObject SetExpandWidth(this GameObject c, bool expand)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    bool expand
    Returns
    Type Description
    UnityEngine.GameObject

    SetExpandWidth(GameObject, float)

    Declaration
    public static GameObject SetExpandWidth(this GameObject c, float value)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    float value
    Returns
    Type Description
    UnityEngine.GameObject

    SetExpandWidth<T>(T, bool)

    Declaration
    public static T SetExpandWidth<T>(this T c, bool expand) where T : Component
    Parameters
    Type Name Description
    T c
    bool expand
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetExpandWidth<T>(T, float)

    Declaration
    public static T SetExpandWidth<T>(this T c, float value) where T : Component
    Parameters
    Type Name Description
    T c
    float value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetHeight(GameObject, float)

    Declaration
    public static GameObject SetHeight(this GameObject c, float height)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    float height
    Returns
    Type Description
    UnityEngine.GameObject

    SetHeight<T>(T, float)

    Declaration
    public static T SetHeight<T>(this T c, float height) where T : Component
    Parameters
    Type Name Description
    T c
    float height
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetText(GameObject, string)

    Declaration
    public static GameObject SetText(this GameObject c, string text)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    string text
    Returns
    Type Description
    UnityEngine.GameObject

    SetText<T>(T, string)

    Declaration
    public static T SetText<T>(this T c, string text) where T : Component
    Parameters
    Type Name Description
    T c
    string text
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetTextLocalized(GameObject, string)

    Declaration
    public static GameObject SetTextLocalized(this GameObject c, string key)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    string key
    Returns
    Type Description
    UnityEngine.GameObject

    SetTextLocalized<T>(T, string)

    Declaration
    public static T SetTextLocalized<T>(this T c, string key) where T : Component
    Parameters
    Type Name Description
    T c
    string key
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetWidth(GameObject, float)

    Declaration
    public static GameObject SetWidth(this GameObject c, float width)
    Parameters
    Type Name Description
    UnityEngine.GameObject c
    float width
    Returns
    Type Description
    UnityEngine.GameObject

    SetWidth<T>(T, float)

    Declaration
    public static T SetWidth<T>(this T c, float width) where T : Component
    Parameters
    Type Name Description
    T c
    float width
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    In This Article
    Back to top Shape of Dreams API Documentation