Example #1
0
        public override void OnInspectorGUI()
        {
            EditorGUIUtility.labelWidth = EditorVariables.MediumLabelWidth;
            serializedObject.Update();
            SelectedTab.intValue = GUILayout.Toolbar(SelectedTab.intValue, ToolbarTabs);
            GUILayout.Space(6);
            EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider);
            GUILayout.Space(6);
            switch (SelectedTab.intValue)
            {
            case 0: DrawGeneralVariables(); break;

            case 1: UIEditor.OnInspectorGUI(); break;

            case 2: ButtonSettingsEditor.OnInspectorGUI(); break;

            case 3: OpenCreateInterface(); break;

            default: return;
            }
            GUILayout.Space(10);

            serializedObject.ApplyModifiedProperties();

            //base.OnInspectorGUI();
        }
Example #2
0
        private void OnEnable()
        {
            SetEditorVariables();
            evaluator.CreateEditorVariables();

            ButtonSettingsEditor.OnEnable(ButtonSettings);
            UIEditor.OnEnable(UI);
        }
Example #3
0
        private void SetEditorVariables()
        {
            evaluator                  = (Evaluator)target;
            highlight_duration         = serializedObject.FindProperty("answer_highlight_duration");
            OnFinishedEvaluationAction = serializedObject.FindProperty("OnFinishedEvaluationAction");
            SelectedTab                = serializedObject.FindProperty("SelectedTab");

            ButtonSettings = serializedObject.FindProperty("ButtonSettings");
            UI             = serializedObject.FindProperty("UI");

            ButtonSettingsEditor = new ButtonSettingsEditor();
            UIEditor             = new EvaluationUIEditor();

            ToolbarTabs = new string[4] {
                "General", "Interfaces", "Buttons", "Create"
            };
        }