コード例 #1
0
        private void DrawFieldListButton(Element element, object obj, ITypeHandler handler)
        {
            var buttonText = element.text;

            if (element.type == Element.Type.ValueRow)
            {
                GUI.enabled = !handler.IsLeaf(obj);
                if (GUILayout.Button(buttonText, FieldListButtonStyle, FieldListButtonLayout))
                {
                    action = () => SelectChild(element);
                }
                GUI.enabled = true;
            }
            else if (element.type == Element.Type.Header)
            {
                var color = GUI.color;
                GUI.color = element.textColor;
                GUILayout.Label(element.text, FieldListHeaderLabelStyle);
                GUI.color = color;
            }
        }