Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            UISelectField select = (this.target as UISelectField);

            this.serializedObject.Update();

            this.DrawOptionsArea();
            EditorGUILayout.Separator();
            UISelectFieldEditor.DrawStringPopup("Default option", select.options.ToArray(), select.value, OnDefaultOptionSelected);
            EditorGUILayout.PropertyField(this.m_DirectionProperty);
            EditorGUILayout.PropertyField(this.m_InteractableProperty, new GUIContent("Interactable"));
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_ArrowComponentProperty, new GUIContent("Arrow Component"));
            EditorGUILayout.PropertyField(this.m_LabelComponentProperty, new GUIContent("Label Component"));
            EditorGUILayout.Separator();
            this.DrawSelectFieldLayotProperties();
            EditorGUILayout.Separator();
            this.DrawListLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawListSeparatorLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawOptionLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawOptionBackgroundLayoutProperties();
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_NavigationProperty);
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_OnChangeProperty);

            this.serializedObject.ApplyModifiedProperties();
        }
        public override void OnInspectorGUI()
        {
            UISwitchSelect select = (this.target as UISwitchSelect);

            this.serializedObject.Update();

            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_Text, new GUIContent("Label Text"));
            EditorGUILayout.PropertyField(this.m_PrevButton, new GUIContent("Prev Button"));
            EditorGUILayout.PropertyField(this.m_NextButton, new GUIContent("Next Button"));

            EditorGUILayout.Separator();
            this.DrawOptionsArea();

            EditorGUILayout.Separator();
            UISelectFieldEditor.DrawStringPopup("Selected option", select.options.ToArray(), select.value, OnDefaultOptionSelected);

            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_OnChange);

            this.serializedObject.ApplyModifiedProperties();
        }
        public override void OnInspectorGUI()
        {
            if (this.m_FoldoutStyle == null)
            {
                this.m_FoldoutStyle = new GUIStyle(EditorStyles.foldout);
                this.m_FoldoutStyle.normal.textColor = Color.black;
                this.m_FoldoutStyle.fontStyle        = FontStyle.Bold;
            }

            UISelectField select = (this.target as UISelectField);

            this.serializedObject.Update();

            this.DrawOptionsArea();
            EditorGUILayout.Separator();
            UISelectFieldEditor.DrawStringPopup("Default option", select.options.ToArray(), select.value, OnDefaultOptionSelected);
            EditorGUILayout.PropertyField(this.m_DirectionProperty);
            EditorGUILayout.PropertyField(this.m_InteractableProperty, new GUIContent("Interactable"));
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_LabelTextProperty, new GUIContent("Label Text"));
            EditorGUILayout.Separator();
            this.DrawSelectFieldLayotProperties();
            EditorGUILayout.Separator();
            this.DrawListLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawListSeparatorLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawOptionLayoutProperties();
            EditorGUILayout.Separator();
            this.DrawOptionBackgroundLayoutProperties();
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_NavigationProperty);
            EditorGUILayout.Separator();
            EditorGUILayout.PropertyField(this.m_OnChangeProperty);

            this.serializedObject.ApplyModifiedProperties();
        }