Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            serialized.Update();
            Color prev_color = GUI.backgroundColor;

            GUILayout.Space(5f);
            Rect           rect       = GUILayoutUtility.GetRect(200, 60, GUILayout.ExpandWidth(true));
            HelmController controller = target as HelmController;

            if (keyboard.DoKeyboardEvents(rect, controller))
            {
                Repaint();
            }

            keyboard.DrawKeyboard(rect, controller.GetPressedNotes());
            GUILayout.Space(5f);
            GUI.backgroundColor = prev_color;

            EditorGUILayout.IntSlider(channel, 0, Utils.kMaxChannels - 1);
            GUILayout.Space(5f);

            float height       = parameterList.GetHeight(controller);
            Rect  keyzonesRect = GUILayoutUtility.GetRect(minWidth, height, GUILayout.ExpandWidth(true));

            parameterList.DrawParameters(keyzonesRect, controller, serialized);
            GUILayout.Space(10.0f);
            serialized.ApplyModifiedProperties();
        }