protected override void Draw(GameTime gameTime) { if (!_isWindowFocused) { return; } GraphicsDevice.Clear(_clearColor); var r = new RectangleF(32, 32, 196, 32); var c = r.Contains(new PointF(_previousMouseState.X, _previousMouseState.Y)) ? _previousMouseState.LeftButton == ButtonState.Pressed ? Color.OrangeRed : Color.Yellow : Color.Peru; var t = r.Contains(new PointF(_previousMouseState.X, _previousMouseState.Y)) ? 4.0f : 1.0f; _spriteBatch.Begin(); _spriteBatch.DrawRectangle(r, c, t); _spriteBatch.End(); _worldRenderer.Draw(GraphicsDevice, _currentWorld, _camera); _imGuiRenderer.BeginLayout(gameTime); DrawUserInterface(gameTime); ImGui.ShowDemoWindow(); _windowProvider.Draw(); _imGuiRenderer.EndLayout(); base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(new Color(_clearColor.X, _clearColor.Y, _clearColor.Z)); //spriteBatch.Begin(); //Your regular Game draw calls // spriteBatch.End(); base.Draw(gameTime); _imGuiRenderer.BeginLayout(gameTime); ImGuiLayout(); _imGuiRenderer.EndLayout(); }