예제 #1
0
        private void DrawGraph(Rect rect)
        {
            var count = SetupArrays();


            GraphDrawer.DrawGraph(this, rect, count);
        }
예제 #2
0
        public void Draw(Rect rect)
        {
            if (GUIController.CurrentProfiler == null)
            {
                return;
            }

            var c = new Rect(rect.x, rect.y, 20, 20);

            if (doSettings)
            {
                c.height = 30;
                DrawSettings(this, ref rect);
            }

            if (Mouse.IsOver(rect) && Event.current.isScrollWheel &&
                (Input.mouseScrollDelta.y > 0f || Input.mouseScrollDelta.y < 0f))
            {
                entryCount = Mathf.Clamp(entryCount - (int)(Input.mouseScrollDelta.y * 100), 100, 2000);
            }

            var stub = Vector2.right;

            Widgets.BeginScrollView(rect, ref stub, rect, false);
            var count = SetupArrays();

            GraphDrawer.DrawGraph(this, rect, count);
            Widgets.EndScrollView();

            if (!doSettings)
            {
                if (Widgets.ButtonImageFitted(c, Textures.Gear))
                {
                    doSettings = !doSettings;
                }
                c.x = c.xMax;
                if (Widgets.ButtonImageFitted(c, TexButton.SpeedButtonTextures[Analyzer.CurrentlyPaused ? 1 : 0]))
                {
                    Analyzer.CurrentlyPaused = !Analyzer.CurrentlyPaused;
                    GUIController.CurrentEntry.SetActive(!Analyzer.CurrentlyPaused);
                }
            }
        }