Пример #1
0
        private void RenderGui(RenderComposer composer)
        {
            ImGui.NewFrame();
            ImGui.Begin("TexturaMagna!", ImGuiWindowFlags.AlwaysAutoResize);
            ImGui.InputInt("Rendered", ref _rendered);
            ImGui.Text("Camera " + Engine.Renderer.Camera.Position);
            ImGui.Text("Scroll to zoom, hold control (left) to fast!");
            ImGui.End();

            composer.RenderToolsMenu(_menu);
            _menu.Render(composer);

            composer.RenderUI();
        }
Пример #2
0
        public void Draw(RenderComposer composer)
        {
            ImGui.NewFrame();

            foreach (var scene in _scenes)
            {
                if (ImGui.Button(scene.Name))
                {
                    Engine.SceneManager.SetScene((IScene)Activator.CreateInstance(scene));
                    break;
                }
            }

            composer.RenderUI();
        }
Пример #3
0
        private void RenderGui(RenderComposer composer)
        {
            composer.SetUseViewMatrix(false);
            composer.SetDepthTest(false);

            ImGui.NewFrame();
            ImGui.Begin("InfoBox", ImGuiWindowFlags.AlwaysAutoResize);
            ImGui.Text("Camera " + Engine.Renderer.Camera.Position + " | @z: " + Engine.Renderer.Camera.Zoom);
            ImGui.Text("RenderTileCount [" + _rendered + "]");
            ImGui.End();

            composer.RenderToolsMenu(_menu);
            _menu.Render(composer);

            composer.RenderUI();
        }
Пример #4
0
        public static void RenderToolsMenu(this RenderComposer composer)
        {
            if (ToolsWindowManager == null)
            {
                ToolsWindowManager = new WindowManager();
            }

            composer.SetDepthTest(false);
            composer.SetUseViewMatrix(false);

            ToolsWindowManager.Update();

            ImGui.NewFrame();
            RenderToolsMenu(composer, ToolsWindowManager);
            ToolsWindowManager.Render(composer);
            composer.RenderUI();
        }
Пример #5
0
        private void DrawGui(RenderComposer composer)
        {
            ImGui.NewFrame();

            ImGui.Text("         X        |        Y         ");
            ImGui.DragFloat2("Barrier Start", ref _barrierStart);
            ImGui.DragFloat2("Barrier End", ref _barrierEnd);
            ImGui.Separator();
            ImGui.DragFloat2("Ray Start", ref _rayStart);
            ImGui.DragFloat2("Ray End", ref _rayDirection);
            ImGui.Text("         X        |        Y         ");
            ImGui.Text($"CrossPoint = {_crossPoint.ToString()}");

            var distance = _crossPoint.HasValue ? (_rayStart - _crossPoint.Value).Length() : (float?)null;

            ImGui.Text($"Distance = {distance}");

            composer.RenderUI();
        }