Example #1
0
 private void OpenCreateInterface()
 {
     if (GUILayout.Button(new GUIContent("Open Creator Editor")))
     {
         TestCreatorWindow.DisplayWindow();
     }
 }
Example #2
0
        public static void DisplayWindow()
        {
            TestCreatorWindow window = (TestCreatorWindow)EditorWindow.GetWindow(typeof(TestCreatorWindow));

            window.minSize = new Vector2(1030, 350);
            window.maxSize = new Vector2(1035, 355);
            window.Show();
            PrepareEssentials();
        }
Example #3
0
        private void OnGUI()
        {
            if (myObject == null)
            {
                TestCreatorWindow window = (TestCreatorWindow)EditorWindow.GetWindow(typeof(TestCreatorWindow));
                window.Close();
                return;
            }

            SetEditorVariables();
            if (!createdvariables)
            {
                return;
            }
            myObject.Update();

            if (currentTest.intValue < 0 || currentTest.intValue >= Tests.arraySize)
            {
                currentTest.intValue = 0;
            }

            DrawBackground();

            float lableWidth = EditorGUIUtility.labelWidth;

            GUILayout.Space(10);
            EditorGUILayout.BeginHorizontal();
            GUILayout.Space(10);
            DrawTestsList();
            GUILayout.Space(10);
            DrawTestData();
            GUILayout.Space(20);
            DrawQuestions();
            GUILayout.Space(25);
            EditorGUILayout.EndHorizontal();

            EditorGUIUtility.labelWidth = lableWidth;
            myObject.ApplyModifiedProperties();
        }