diff --git a/Source/Demos/Demo.Features/Demos/GuiDemo.cs b/Source/Demos/Demo.Features/Demos/GuiDemo.cs index ea89e28f..3d98502a 100644 --- a/Source/Demos/Demo.Features/Demos/GuiDemo.cs +++ b/Source/Demos/Demo.Features/Demos/GuiDemo.cs @@ -1,13 +1,10 @@ -using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGame.Extended; using MonoGame.Extended.Gui; using MonoGame.Extended.Gui.Controls; -using MonoGame.Extended.Gui.Serialization; using MonoGame.Extended.ViewportAdapters; -using Newtonsoft.Json; namespace Demo.Features.Demos { diff --git a/Source/MonoGame.Extended.Gui/GuiSpriteBatchRenderer.cs b/Source/MonoGame.Extended.Gui/GuiSpriteBatchRenderer.cs index e57a4af4..6d1e8cec 100644 --- a/Source/MonoGame.Extended.Gui/GuiSpriteBatchRenderer.cs +++ b/Source/MonoGame.Extended.Gui/GuiSpriteBatchRenderer.cs @@ -47,7 +47,7 @@ namespace MonoGame.Extended.Gui public void DrawRegion(TextureRegion2D textureRegion, Rectangle rectangle, Color color, Rectangle? clippingRectangle = null) { - if(textureRegion != null) + if (textureRegion != null) _spriteBatch.Draw(textureRegion, rectangle, color, clippingRectangle); } diff --git a/Source/MonoGame.Extended.Gui/GuiSystem.cs b/Source/MonoGame.Extended.Gui/GuiSystem.cs index 60c8ce21..2f74ea8a 100644 --- a/Source/MonoGame.Extended.Gui/GuiSystem.cs +++ b/Source/MonoGame.Extended.Gui/GuiSystem.cs @@ -5,7 +5,6 @@ using MonoGame.Extended.Gui.Controls; using MonoGame.Extended.Input.InputListeners; using MonoGame.Extended.ViewportAdapters; using System; -using System.ComponentModel; namespace MonoGame.Extended.Gui { diff --git a/Source/MonoGame.Extended/ShapeExtensions.cs b/Source/MonoGame.Extended/ShapeExtensions.cs index 8cb9432f..22e70d03 100644 --- a/Source/MonoGame.Extended/ShapeExtensions.cs +++ b/Source/MonoGame.Extended/ShapeExtensions.cs @@ -11,17 +11,17 @@ namespace MonoGame.Extended /// public static class ShapeExtensions { - private static Texture2D _texture; + private static Texture2D _whitePixelTexture; private static Texture2D GetTexture(SpriteBatch spriteBatch) { - if (_texture == null) + if (_whitePixelTexture == null) { - _texture = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); - _texture.SetData(new[] {Color.White}); + _whitePixelTexture = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); + _whitePixelTexture.SetData(new[] {Color.White}); } - return _texture; + return _whitePixelTexture; } ///