Beispiel #1
0
        private void DoActiveViewGUI()
        {
            var rect = GUILayoutUtility.GetLastRect();
            // GUI for the active tab
            if (ActiveView != null)
            {
                ActiveView.OnGUI();
            }

            if (IsBusy && activeTab != SubTab.Settings && Event.current.type == EventType.Repaint)
            {
                if (timeSinceLastRotation < 0)
                {
                    timeSinceLastRotation = EditorApplication.timeSinceStartup;
                }
                else
                {
                    var elapsedTime = (float)(EditorApplication.timeSinceStartup - timeSinceLastRotation);
                    if (spinner == null)
                        spinner = new Spinner();
                    spinner.Start(elapsedTime);
                    spinner.Rotate(elapsedTime);

                    spinner.Render();

                    rect = new Rect(0f, rect.y + rect.height, Position.width, Position.height - (rect.height + rect.y));
                    rect = spinner.Layout(rect);
                    rect.y += rect.height + 30;
                    rect.height = 20;
                    if (!String.IsNullOrEmpty(appManagerProgressMessage))
                        EditorGUI.ProgressBar(rect, appManagerProgressValue, appManagerProgressMessage);
                }
            }
        }
Beispiel #2
0
        public override void OnUI()
        {
            base.OnUI();

            if (HasRepository)
            {
                DoHeaderGUI();
            }

            DoToolbarGUI();

            var rect = GUILayoutUtility.GetLastRect();

            // GUI for the active tab
            if (ActiveView != null)
            {
                ActiveView.OnGUI();
            }

            if (IsBusy && activeTab != SubTab.Settings && Event.current.type == EventType.Repaint)
            {
                if (timeSinceLastRotation < 0)
                {
                    timeSinceLastRotation = EditorApplication.timeSinceStartup;
                }
                else
                {
                    var elapsedTime = (float)(EditorApplication.timeSinceStartup - timeSinceLastRotation);
                    if (spinner == null)
                    {
                        spinner = new Spinner();
                    }
                    spinner.Start(elapsedTime);
                    spinner.Rotate(elapsedTime);

                    spinner.Render();

                    rect        = new Rect(0f, rect.y + rect.height, Position.width, Position.height - (rect.height + rect.y));
                    rect        = spinner.Layout(rect);
                    rect.y     += rect.height + 30;
                    rect.height = 20;
                    if (!String.IsNullOrEmpty(progressMessage))
                    {
                        EditorGUI.ProgressBar(rect, progressValue / 100, progressMessage);
                    }
                }
            }
        }
Beispiel #3
0
        public override void OnUI()
        {
            base.OnUI();

            if (HasRepository)
            {
                DoHeaderGUI();
            }

            DoToolbarGUI();

            // GUI for the active tab
            if (ActiveView != null)
            {
                ActiveView.OnGUI();
            }
        }
 public override void OnGUI()
 {
     DoToolbarGUI();
     ActiveView.OnGUI();
 }
Beispiel #5
0
 public override void OnUI()
 {
     base.OnUI();
     ActiveView.OnGUI();
 }