Exemplo n.º 1
0
    public bool Toggle(string text, bool open, bool allowCollapse = true)
    {
        var result = GUIHelpers.DoToolbar(text, open);

        if (open || result)
        {
            EditorGUILayout.Space();
            if (result)
            {
                return(!open);
            }
        }

        return(open);
    }
Exemplo n.º 2
0
    public bool Toggle(string text, bool open, bool allowCollapse = true)
    {
        var result = GUIHelpers.DoToolbar(text, open);

        if (open || result)
        {
            EditorGUILayout.Space();
            if (result)
            {
                return(!open);
            }
        }

        return(open);
        //var rect = UBEditor.GetRect(UBStyles.SubHeaderStyle);
        //var result = GUI.Toggle(rect, open,allowCollapse ? (open ? "- " : "+ ") + text : text, UBStyles.SubHeaderStyle);

        //return result;
    }