Example #1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(gridElement);
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(scrollType);
            EditorGUILayout.PropertyField(rowOrColumn);
            EditorGUILayout.PropertyField(horizontalSpace);
            EditorGUILayout.PropertyField(verticalSpace);
            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
                _scrollView.changeGridElement();
            }

            EditorGUILayout.PropertyField(loop);
            if (!loop.boolValue)
            {
                EditorGUILayout.PropertyField(maxOutDistancePercent);
            }

            EditorGUILayout.PropertyField(AlignGrid);
            if (AlignGrid.boolValue)
            {
                EditorGUILayout.PropertyField(AlignTime);
            }

            GUILayout.BeginHorizontal();
            GUILayout.Label("裁剪类型:", GUILayout.Width(60));
            EditorGUI.BeginChangeCheck();
            maskType.intValue = EditorGUILayout.Popup(maskType.intValue, MASK_TYPE_LIST, GUILayout.Width(100), GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                EditorControl.callLater(changeMaskType);
            }
            GUILayout.EndHorizontal();

            _isShowRarelyUse = EditorGUILayout.Foldout(_isShowRarelyUse, "手感属性");
            if (_isShowRarelyUse)
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(SpeedRatio);
                EditorGUILayout.PropertyField(SpeedBegin);
                EditorGUILayout.PropertyField(SpeedEnd);
                EditorGUILayout.PropertyField(SpeedMax);
                EditorGUILayout.PropertyField(SpeedDis);
                EditorGUILayout.PropertyField(OutSpeedDis);
                EditorGUILayout.PropertyField(BackTime);
                EditorGUILayout.PropertyField(ScrollLogicDistance);
                EditorGUI.indentLevel--;
            }

            EditorGUILayout.PropertyField(NeedChangeAlpha);

            if (NeedChangeAlpha.boolValue)
            {
                EditorGUILayout.PropertyField(ChangeAlphaLen);
            }

            serializedObject.ApplyModifiedProperties();

            if (string.IsNullOrEmpty(gridElement.stringValue))
            {
                EditorGUILayout.HelpBox("请指定gridElement", MessageType.Error);
            }
        }
Example #2
0
        // protected virtual Rect getShowRect()
        // {
        //  return new Rect(0,0,400,300);
        // }

        public void show()
        {
            _editorVersion = EditorControl.getVersion();

            this.Show();
        }