예제 #1
0
        public override void OnInspectorGUI()
        {
            buttonType.OnInspectorButtonType(button);

            EditorGUILayout.BeginVertical(GUILayout.Width(500));

            GUILayout.Space(10);

            GUILayout.Space(10);

            button.IsEnable = EditorGUILayout.Toggle("是否启用(IsEnable)", button.IsEnable);

            buttonAudio.OnInspectorButtonAudio(button);

            GUILayout.Space(20);

            button.zValue   = EditorGUILayout.FloatField("相对摄像机Z轴值:", button.zValue);
            button.maxCount = EditorGUILayout.IntField("最大数:", button.maxCount);
            EditorGUILayout.PropertyField(BindObject, true, null);
            EditorGUILayout.PropertyField(Panel, true, null);


            EditorGUILayout.EndVertical();

            buttonEvent.OnInspectorButtonEvent();


            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
예제 #2
0
        public override void OnInspectorGUI()
        {
            buttonType.OnInspectorButtonType(dropdown);
            buttonAudio.OnInspectorButtonAudio(dropdown);

            GUILayout.BeginVertical("box", GUILayout.Width(500));

            GUILayout.Space(10);

            EditorGUILayout.LabelField("下拉框属性", MUtilityStyle.LabelStyle);

            EditorGUILayout.PropertyField(Names, true, null);
            EditorGUILayout.PropertyField(ScrollView, true, null);
            EditorGUILayout.PropertyField(Template, true, null);
            EditorGUILayout.PropertyField(textName, true, null);

            EditorGUILayout.PropertyField(gridLayout, true, null);
            EditorGUILayout.PropertyField(dropdownItem, true, null);

            EditorGUILayout.EndVertical();

            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
예제 #3
0
 public override void OnInspectorGUI()
 {
     buttonType.OnInspectorButtonType(dropdownItem);
     buttonAudio.OnInspectorButtonAudio(dropdownItem);
     if (EditorGUI.EndChangeCheck())
     {
         serializedObject.ApplyModifiedProperties();
     }
 }
예제 #4
0
        public override void OnInspectorGUI()
        {
            ButtonType.OnInspectorButtonType(button);

            GUILayout.BeginVertical(GUILayout.Width(500));

            GUILayout.Space(10);

            button.IsEnable = EditorGUILayout.Toggle("是否启用(IsEnable)", button.IsEnable);

            EditorGUILayout.EndVertical();

            ButtonAudio.OnInspectorButtonAudio(button);

            ButtonEvent.OnInspectorButtonEvent();

            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
예제 #5
0
        public override void OnInspectorGUI()
        {
            ButtonType.OnInspectorButtonType(button);

            EditorGUILayout.BeginVertical(GUILayout.Width(500));

            GUILayout.Space(10);

            button.IsEnable = EditorGUILayout.Toggle("是否启用(IsEnable)", button.IsEnable);

            ButtonAudio.OnInspectorButtonAudio(button);

            button.IsButtonGroup = EditorGUILayout.Toggle("是否归属Button组:", button.IsButtonGroup);

            if (button.IsButtonGroup)
            {
                EditorGUILayout.PropertyField(buttonGroup, true, null);
                button.IsShowButton = EditorGUILayout.Toggle("IsShowButton[是否默认按下]:", button.IsShowButton);
            }

            GUILayout.Space(20);

            if (button.IsButtonGroup)
            {
                EditorGUILayout.PropertyField(onGroupReset, true, null);
            }

            ButtonEvent.OnInspectorButtonEvent();

            EditorGUILayout.EndVertical();



            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
            }
        }
예제 #6
0
 public override void OnInspectorGUI()
 {
     buttonType.OnInspectorButtonType(dropdownItem);
     buttonAudio.OnInspectorButtonAudio(dropdownItem);
 }
예제 #7
0
        public override void OnInspectorGUI()
        {
            GUILayout.Space(10);

            EditorGUILayout.BeginVertical(GUILayout.Width(500));

            toggle.buttonType = (ButtonType)EditorGUILayout.EnumPopup("交互类型:", toggle.buttonType);

            switch (toggle.buttonType)
            {
            case ButtonType.Image:

                EditorGUI.BeginChangeCheck();

                EditorGUILayout.PropertyField(image, new GUIContent("Image对象(Image):"), true, null);
                EditorGUILayout.PropertyField(onNormalSprite, new GUIContent("默认开纹理(onNormalSprite):", "Toggle默认开时的状态"), true, null);
                EditorGUILayout.PropertyField(offNormalSprite, new GUIContent("默认关纹理(offNormalSprite):", "Toggle默认关的状态"), true, null);

                EditorGUILayout.PropertyField(onEnterSprite, new GUIContent("开时,移入纹理(onEnterSprite):", "如果此时状态为开,当移入时,开的一种交互状态"), true, null);
                EditorGUILayout.PropertyField(offEnterSprite, new GUIContent("关时,移入纹理(offEnterSprite):", "如果此时状态为关,当移入时,关的一种交互状态"), true, null);

                break;

            case ButtonType.Object:

                EditorGUI.BeginChangeCheck();

                EditorGUILayout.PropertyField(onNormalObject, new GUIContent("默认开物体对象(onNormalObject):", "Toggle默认开时的状态"), true, null);
                EditorGUILayout.PropertyField(offNormalObject, new GUIContent("默认关物体对象(offNormalObject):", "Toggle默认关时的状态"), true, null);

                EditorGUILayout.PropertyField(onEnterObject, new GUIContent("开时,移入物体对象(onEnterObject):", "如果此时状态为开,当移入时,开的一种交互状态"), true, null);
                EditorGUILayout.PropertyField(offEnterObject, new GUIContent("关时,移入物体对象(offEnterObject):", "如果此时状态为关,当移入时,关的一种交互状态"), true, null);

                break;

            case ButtonType.SpriteRenderer:

                EditorGUI.BeginChangeCheck();

                EditorGUILayout.PropertyField(spriteRenderer, new GUIContent("SpriteRenderer对象(SpriteRenderer):"), true, null);

                EditorGUILayout.PropertyField(onNormalSprite, new GUIContent("默认开纹理(onNormalSprite):", "Toggle默认开的状态"), true, null);
                EditorGUILayout.PropertyField(offNormalSprite, new GUIContent("默认关纹理(offNormalSprite):", "Toggle默认关的状态"), true, null);

                EditorGUILayout.PropertyField(onEnterSprite, new GUIContent("开时,移入纹理(onEnterSprite):", "如果此时状态为开,当移入时,开的一种交互状态"), true, null);
                EditorGUILayout.PropertyField(offEnterSprite, new GUIContent("关时,移入纹理(offEnterSprite):", "如果此时状态为关,当移入时,关的一种交互状态"), true, null);

                break;

            default:
                EditorGUI.BeginChangeCheck();
                break;
            }

            buttonAudio.OnInspectorButtonAudio(toggle);

            GUILayout.Space(10);
            toggle.IsValue = EditorGUILayout.Toggle("IsValue:", toggle.IsValue);

            EditorGUILayout.PropertyField(OnValueChanged, true, null);

            GUILayout.EndVertical();

            serializedObject.ApplyModifiedProperties();
        }