示例#1
0
    void OnGUI()
    {
        KeyboardWindowControls();
        if (!HandleMissingData())
        {
            return;
        }

        if (audioCreatorGUI == null)
        {
            audioCreatorGUI = new AudioCreatorGUI(this);
        }

        isDirty = false;
        DrawTop(topHeight);

        isDirty |= audioCreatorGUI.OnGUI(LeftWidth, (int)position.height - topHeight);

        if (isDirty)
        {
            Repaint();
        }

        PostOnGUI();
    }
示例#2
0
    void OnGUI()
    {
        CheckForClose();

        //int nextControlID = GUIUtility.GetControlID(FocusType.Passive) + 1;
        //Debug.Log(nextControlID);
        if (!HandleMissingData())
        {
            return;
        }

        if (audioCreatorGUI == null)
        {
            audioCreatorGUI = new AudioCreatorGUI(this);
        }

        isDirty = false;


        try
        {
            DrawTop(topHeight);
            isDirty |= audioCreatorGUI.OnGUI(LeftWidth, (int)position.height - topHeight);
        }
        catch (ExitGUIException e)
        {
            throw e;
        }

        /*catch (ArgumentException e)
         * {
         *  throw e;
         * }*/
        catch (Exception e)
        {
            if (e.GetType() != typeof(ArgumentException))
            {
                Debug.LogException(e);

                //While this catch was made to catch persistent errors,  like a missing null check, it can also catch other errors
                EditorGUILayout.BeginVertical();
                EditorGUILayout.HelpBox(
                    "An exception is getting caught while trying to draw this window.\nPlease report this bug to InAudio and if possible how to reproduce it",
                    MessageType.Error);

                EditorGUILayout.TextArea(e.ToString());
                EditorGUILayout.EndVertical();
            }
        }


        if (isDirty)
        {
            Repaint();
        }

        PostOnGUI();
    }
示例#3
0
 void OnEnable()
 {
     BaseEnable();
     if (audioCreatorGUI == null)
     {
         audioCreatorGUI = new AudioCreatorGUI(this);
         audioCreatorGUI.OnEnable();
     }
 }
示例#4
0
        private void OnEnable()
        {
            BaseEnable();

            if (audioCreatorGUI == null)
            {
                audioCreatorGUI = new AudioCreatorGUI(this);

            }
            audioCreatorGUI.OnEnable();
        }
示例#5
0
        private void OnGUI()
        {
            CheckForClose();

            //int nextControlID = GUIUtility.GetControlID(FocusType.Passive) + 1;
            //Debug.Log(nextControlID);  
            if (!HandleMissingData())
            {
                return;
            }

            if (audioCreatorGUI == null)
                audioCreatorGUI = new AudioCreatorGUI(this);

            isDirty = false;


            try
            {
                DrawTop(topHeight);
                isDirty |= audioCreatorGUI.OnGUI(LeftWidth, (int) position.height - topHeight);
            }
            catch (ExitGUIException e)
            {
                throw e;
            }
                /*catch (ArgumentException e)
        {
            throw e;
        }*/
            catch (Exception e)
            {
                if (e.GetType() != typeof (ArgumentException))
                {
                    Debug.LogException(e);

                    //While this catch was made to catch persistent errors,  like a missing null check, it can also catch other errors
                    EditorGUILayout.BeginVertical();
                    EditorGUILayout.HelpBox(
                        "An exception is getting caught while trying to draw this window.\nPlease report this bug to InAudio and if possible how to reproduce it",
                        MessageType.Error);

                    EditorGUILayout.TextArea(e.ToString());
                    EditorGUILayout.EndVertical();
                }
            }


            if (isDirty)
                Repaint();

            PostOnGUI();
        }