예제 #1
0
        public void DrawCommonSettings()
        {
            EditorGUI.PropertyField(_rect, _mode, _labelControlMode);
            MoveRectToNextLine();

            if (_mode.enumValueIndex == (int)MidiControl.Mode.NoteEnvelope)
            {
                EditorGUI.PropertyField(_rect, _noteFilter, _labelNoteOctave);
                MoveRectToNextLine();

                var r = _rect;
                r.height = MidiEnvelopeDrawer.GetHeight();
                EditorGUI.PropertyField(r, _envelope);
                _rect.y += r.height;
            }
            else if (_mode.enumValueIndex == (int)MidiControl.Mode.NoteCurve)
            {
                EditorGUI.PropertyField(_rect, _noteFilter, _labelNoteOctave);
                MoveRectToNextLine();

                EditorGUI.PropertyField(_rect, _curve);
                MoveRectToNextLine();
            }
            else // CC
            {
                EditorGUI.PropertyField(_rect, _ccNumber, _labelCCNumber);
                MoveRectToNextLine();
            }

            EditorGUI.PropertyField(_rect, _targetComponent, _labelTarget);
            MoveRectToNextLine();
        }
예제 #2
0
        public void DrawCommonSettings()
        {
            if (ControlMode == MidiControlMode.ControlChange)
            {
                EditorGUI.PropertyField(_rect, _controlNumber);
                MoveRectToNextLine();
            }
            else
            {
                EditorGUI.PropertyField(_rect, _noteFilter, _labelNoteOctave);
                MoveRectToNextLine();

                var r = _rect;
                r.height = MidiEnvelopeDrawer.GetHeight();
                EditorGUI.PropertyField(r, _envelope);
                _rect.y += r.height;
            }

            EditorGUI.PropertyField(_rect, _targetComponent, _labelTarget);
            MoveRectToNextLine();
        }