public override void OnInspectorGUI()
        {
            _picker.Draw(style);
            GUILayout.Space(5);
            UICombobox b = style as UICombobox;

            if (b != null)
            {
                EditorGUI.BeginChangeCheck();
                b.rowCount = EditorGUILayout.IntSlider("Row Count", b.rowCount, 1, 20);

                EditorGUI.indentLevel++;
                _drawCaptionTex = EditorGUILayout.Foldout(_drawCaptionTex, "Caption Text", true);
                if (_drawCaptionTex)
                {
                    EditorGUI.indentLevel++;
                    _caption.Draw(b.captionText);
                    EditorGUI.indentLevel--;
                }
                _drawItemText = EditorGUILayout.Foldout(_drawItemText, "Item Text", true);
                if (_drawItemText)
                {
                    EditorGUI.indentLevel++;
                    _item.Draw(b.itemText);
                    EditorGUI.indentLevel--;
                }
                if (EditorGUI.EndChangeCheck())
                {
                    EditorUtility.SetDirty(b);
                }
                EditorGUI.indentLevel--;
            }
            DrawSolovView();
            GUILayout.Space(10);
        }
        public override void OnInspectorGUI()
        {
            _picker.Draw(style);
            GUILayout.Space(5);
            EditorGUI.BeginChangeCheck();
            GUILayout.Label("Text");
            float h = GUI.skin.textArea.CalcSize(new GUIContent(_field.text)).y;

            if (h < 50)
            {
                h = 50;
            }
            _field.text = EditorGUILayout.TextArea(_field.text, GUI.skin.textArea, GUILayout.Height(h));
            if (_field.textStyle.owner == null)
            {
                _field.textStyle.owner = _field;
            }
            _field.multiLang = EditorGUILayout.Toggle("Multi Lang", _field.multiLang);
            _field.langKey   = EditorGUILayout.TextField("Lang Key", _field.langKey);
            DrawSeperator();
            _textEditor.Draw(_field.textStyle);
            DrawSeperator();
            EditorGUILayout.LabelField("Border (Left, Top, Right, Bottom)");
            _field.border = EditorGUILayout.Vector4Field("", _field.border);
            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(_field);
            }
            _scrollDrawer.Draw(_field.scrollSetting, _field);
            DrawSolovView();
            GUILayout.Space(10);
        }
        public override void OnInspectorGUI()
        {
            UITabNavigator b = style as UITabNavigator;

            _picker.Draw(style);
            EditorGUI.BeginChangeCheck();
            b.alignment      = (UITabNavigagor_Dll.TabAlignment)EditorGUILayout.EnumPopup("Aligment", b.alignment);
            b.interval       = EditorGUILayout.DelayedFloatField("Interval", b.interval);
            b.unselectMargin = EditorGUILayout.DelayedFloatField("UnSelected Margin", b.unselectMargin);
            b.multiLang      = EditorGUILayout.Toggle("Multi Lang", b.multiLang);
            b.langKey        = EditorGUILayout.TextField("Lang Key", b.langKey);
            DrawSeperator();
            GUILayout.Space(5);
            _listDrawer.Draw(serializedObject);
            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(b);
            }
            _showText = EditorGUILayout.Foldout(_showText, "Text Style", true);
            if (_showText)
            {
                EditorGUI.BeginChangeCheck();
                if (b.textStyle.owner == null)
                {
                    b.textStyle.owner = b;
                }
                _textEditor.Draw(b.textStyle);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorUtility.SetDirty(b);
                }
            }
            DrawSolovView();
            GUILayout.Space(10);
        }
        public override void OnInspectorGUI()
        {
            _picker.Draw(style);
            GUILayout.Space(5);
            UIResourceField b = style as UIResourceField;

            if (b != null)
            {
                EditorGUI.BeginChangeCheck();
                b.resourceType = EditorGUILayout.DelayedIntField("ResourceType", b.resourceType);
                b.value        = EditorGUILayout.DelayedFloatField("Value", b.value);
                EditorGUI.indentLevel++;
                _drawTextSetting = EditorGUILayout.Foldout(_drawTextSetting, "Caption Text", true);
                if (_drawTextSetting)
                {
                    EditorGUI.indentLevel++;
                    _textStyle.Draw(b.textStyle);
                    EditorGUI.indentLevel--;
                }

                if (EditorGUI.EndChangeCheck())
                {
                    EditorUtility.SetDirty(b);
                }
                EditorGUI.indentLevel--;
            }
            DrawSolovView();
            GUILayout.Space(10);
        }
Exemplo n.º 5
0
        public override void OnInspectorGUI()
        {
            _picker.Draw(style);
            GUILayout.Space(5);
            UIButton b = style as UIButton;

            if (b != null)
            {
                EditorGUI.BeginChangeCheck();
                b.text = EditorGUILayout.TextField("Label", b.text);
                if (b.textStyle.owner == null)
                {
                    b.textStyle.owner = b;
                }
                _textEditor.Draw(b.textStyle);
                b.multiLang = EditorGUILayout.Toggle("Multi Lang", b.multiLang);
                b.langKey   = EditorGUILayout.TextField("Lang Key", b.langKey);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorUtility.SetDirty(b);
                }
            }
            GUILayout.Space(10);
        }