diff --git a/Demos.Android/Demos.Android.csproj b/Demos.Android/Demos.Android.csproj
index d91dd16..97b7f48 100644
--- a/Demos.Android/Demos.Android.csproj
+++ b/Demos.Android/Demos.Android.csproj
@@ -75,22 +75,22 @@
-
- {1bc4682b-aa14-4937-b5c7-707e20fe88ff}
- Demos
-
-
- {997f4739-7bec-4621-b9ca-68deb2d74412}
- MLEM.Startup
-
-
- {6f00629a-8b87-4264-8896-19983285e32f}
- MLEM.Ui
-
-
- {1d6ab762-43c4-4775-8924-707c7ec3f142}
- MLEM
-
+
+ {1bc4682b-aa14-4937-b5c7-707e20fe88ff}
+ Demos
+
+
+ {997f4739-7bec-4621-b9ca-68deb2d74412}
+ MLEM.Startup
+
+
+ {6f00629a-8b87-4264-8896-19983285e32f}
+ MLEM.Ui
+
+
+ {1d6ab762-43c4-4775-8924-707c7ec3f142}
+ MLEM
+
diff --git a/Demos.DesktopGL/Demos.DesktopGL.csproj b/Demos.DesktopGL/Demos.DesktopGL.csproj
index 7bd84c7..22eb815 100644
--- a/Demos.DesktopGL/Demos.DesktopGL.csproj
+++ b/Demos.DesktopGL/Demos.DesktopGL.csproj
@@ -1,25 +1,25 @@
-
+
Exe
net5.0
Icon.ico
MLEM Desktop Demos
-
+
-
+
-
-
+
+
diff --git a/Demos/AnimationDemo.cs b/Demos/AnimationDemo.cs
index 2b22b7d..0d35462 100644
--- a/Demos/AnimationDemo.cs
+++ b/Demos/AnimationDemo.cs
@@ -16,8 +16,7 @@ namespace Demos {
private Group buttons;
private bool stop;
- public AnimationDemo(MlemGame game) : base(game) {
- }
+ public AnimationDemo(MlemGame game) : base(game) {}
public override void LoadContent() {
base.LoadContent();
diff --git a/Demos/AutoTilingDemo.cs b/Demos/AutoTilingDemo.cs
index c82ff34..b1cf759 100644
--- a/Demos/AutoTilingDemo.cs
+++ b/Demos/AutoTilingDemo.cs
@@ -15,8 +15,7 @@ namespace Demos {
private Texture2D texture;
private string[] layout;
- public AutoTilingDemo(MlemGame game) : base(game) {
- }
+ public AutoTilingDemo(MlemGame game) : base(game) {}
public override void LoadContent() {
base.LoadContent();
diff --git a/Demos/Demo.cs b/Demos/Demo.cs
index 6132aa6..40958ba 100644
--- a/Demos/Demo.cs
+++ b/Demos/Demo.cs
@@ -19,17 +19,13 @@ namespace Demos {
this.Game = game;
}
- public virtual void LoadContent() {
- }
+ public virtual void LoadContent() {}
- public virtual void Update(GameTime time) {
- }
+ public virtual void Update(GameTime time) {}
- public virtual void DoDraw(GameTime time) {
- }
+ public virtual void DoDraw(GameTime time) {}
- public virtual void Clear() {
- }
+ public virtual void Clear() {}
public static T LoadContent(string name) {
return MlemGame.LoadContent(name);
diff --git a/Demos/Demos.csproj b/Demos/Demos.csproj
index e0742c1..381ce66 100644
--- a/Demos/Demos.csproj
+++ b/Demos/Demos.csproj
@@ -1,15 +1,15 @@
-
+
netstandard2.0
-
+
-
+
all
diff --git a/Demos/EasingsDemo.cs b/Demos/EasingsDemo.cs
index dde79f8..2b8005d 100644
--- a/Demos/EasingsDemo.cs
+++ b/Demos/EasingsDemo.cs
@@ -19,8 +19,7 @@ namespace Demos {
private int current;
private float progress;
- public EasingsDemo(MlemGame game) : base(game) {
- }
+ public EasingsDemo(MlemGame game) : base(game) {}
public override void LoadContent() {
base.LoadContent();
diff --git a/Demos/PathfindingDemo.cs b/Demos/PathfindingDemo.cs
index 530e4c9..04ba7ef 100644
--- a/Demos/PathfindingDemo.cs
+++ b/Demos/PathfindingDemo.cs
@@ -18,8 +18,7 @@ namespace Demos {
private List path;
private Button regenerateButton;
- public PathfindingDemo(MlemGame game) : base(game) {
- }
+ public PathfindingDemo(MlemGame game) : base(game) {}
private async void Init() {
this.path = null;
diff --git a/Demos/UiDemo.cs b/Demos/UiDemo.cs
index ce19001..5830420 100644
--- a/Demos/UiDemo.cs
+++ b/Demos/UiDemo.cs
@@ -23,8 +23,7 @@ namespace Demos {
private NinePatch testPatch;
private Panel root;
- public UiDemo(MlemGame game) : base(game) {
- }
+ public UiDemo(MlemGame game) : base(game) {}
public override void LoadContent() {
this.testTexture = LoadContent("Textures/Test");
diff --git a/MLEM.Data/Content/RawContentManager.cs b/MLEM.Data/Content/RawContentManager.cs
index 6ccd28b..93b4b46 100644
--- a/MLEM.Data/Content/RawContentManager.cs
+++ b/MLEM.Data/Content/RawContentManager.cs
@@ -76,8 +76,7 @@ namespace MLEM.Data.Content {
r.Name = assetName;
return t;
}
- } catch (FileNotFoundException) {
- }
+ } catch (FileNotFoundException) {}
}
}
throw new ContentLoadException($"Asset {assetName} not found. Tried files {string.Join(", ", triedFiles)}");
@@ -96,8 +95,7 @@ namespace MLEM.Data.Content {
///
/// Initializes the component. Used to load non-graphical resources.
///
- public void Initialize() {
- }
+ public void Initialize() {}
private static List CollectContentReaders() {
var ret = new List();
diff --git a/MLEM.Data/ContentExtensions.cs b/MLEM.Data/ContentExtensions.cs
index 1e109c9..68fea1d 100644
--- a/MLEM.Data/ContentExtensions.cs
+++ b/MLEM.Data/ContentExtensions.cs
@@ -68,8 +68,7 @@ namespace MLEM.Data {
using (var reader = new JsonTextReader(stream))
return serializerToUse.Deserialize(reader);
}
- } catch (FileNotFoundException) {
- }
+ } catch (FileNotFoundException) {}
}
throw new ContentLoadException($"Asset {name} not found. Tried files {string.Join(", ", triedFiles)}");
}
diff --git a/MLEM.Data/CopyExtensions.cs b/MLEM.Data/CopyExtensions.cs
index a0eeb11..189e52e 100644
--- a/MLEM.Data/CopyExtensions.cs
+++ b/MLEM.Data/CopyExtensions.cs
@@ -110,7 +110,5 @@ namespace MLEM.Data {
/// An attribute that, when added to a constructor, will make that constructor the one used by , and .
///
[AttributeUsage(AttributeTargets.Constructor)]
- public class CopyConstructorAttribute : Attribute {
-
- }
+ public class CopyConstructorAttribute : Attribute {}
}
\ No newline at end of file
diff --git a/MLEM.Data/Json/StaticJsonConverter.cs b/MLEM.Data/Json/StaticJsonConverter.cs
index 2c7ba5c..66beb62 100644
--- a/MLEM.Data/Json/StaticJsonConverter.cs
+++ b/MLEM.Data/Json/StaticJsonConverter.cs
@@ -29,9 +29,7 @@ namespace MLEM.Data.Json {
///
/// The type that the dictionary is declared in
/// The name of the dictionary itself
- public StaticJsonConverter(Type type, string memberName) :
- this(GetEntries(type, memberName)) {
- }
+ public StaticJsonConverter(Type type, string memberName) : this(GetEntries(type, memberName)) {}
/// Writes the JSON representation of the object.
/// The to write to.
diff --git a/MLEM.Data/MLEM.Data.csproj b/MLEM.Data/MLEM.Data.csproj
index 9c9a32c..deaee64 100644
--- a/MLEM.Data/MLEM.Data.csproj
+++ b/MLEM.Data/MLEM.Data.csproj
@@ -4,7 +4,7 @@
true
true
-
+
Ellpeck
Simple data handling for MLEM Library for Extending MonoGame
@@ -17,11 +17,11 @@
README.md
NU1701
-
+
-
+
all
@@ -33,7 +33,7 @@
all
-
+
diff --git a/MLEM.Extended/Font/GenericStashFont.cs b/MLEM.Extended/Font/GenericStashFont.cs
index e36d280..9d11fef 100644
--- a/MLEM.Extended/Font/GenericStashFont.cs
+++ b/MLEM.Extended/Font/GenericStashFont.cs
@@ -38,7 +38,7 @@ namespace MLEM.Extended.Font {
}
///
- protected override void DrawChar(SpriteBatch batch,string cString, Vector2 position, Color color, float rotation, Vector2 scale, SpriteEffects effects, float layerDepth) {
+ protected override void DrawChar(SpriteBatch batch, string cString, Vector2 position, Color color, float rotation, Vector2 scale, SpriteEffects effects, float layerDepth) {
this.Font.DrawText(batch, cString, position, color, scale, rotation, Vector2.Zero, layerDepth);
}
diff --git a/MLEM.Extended/MLEM.Extended.csproj b/MLEM.Extended/MLEM.Extended.csproj
index 0286960..1739308 100644
--- a/MLEM.Extended/MLEM.Extended.csproj
+++ b/MLEM.Extended/MLEM.Extended.csproj
@@ -4,7 +4,7 @@
true
true
-
+
Ellpeck
MLEM Library for Extending MonoGame extension that ties in with MonoGame.Extended and other MonoGame libraries
@@ -16,10 +16,10 @@
Logo.png
README.md
-
+
-
+
all
@@ -33,7 +33,7 @@
all
-
+
diff --git a/MLEM.Startup/MLEM.Startup.csproj b/MLEM.Startup/MLEM.Startup.csproj
index 40a384c..95db618 100644
--- a/MLEM.Startup/MLEM.Startup.csproj
+++ b/MLEM.Startup/MLEM.Startup.csproj
@@ -1,11 +1,11 @@
-
+
netstandard2.0
true
true
-
+
Ellpeck
MLEM Library for Extending MonoGame combined with some other useful libraries into a quick Game startup class
@@ -17,7 +17,7 @@
Logo.png
README.md
-
+
@@ -27,7 +27,7 @@
all
-
+
diff --git a/MLEM.Templates/MLEM.Templates.csproj b/MLEM.Templates/MLEM.Templates.csproj
index 41c0ae0..ac2d3e9 100644
--- a/MLEM.Templates/MLEM.Templates.csproj
+++ b/MLEM.Templates/MLEM.Templates.csproj
@@ -1,5 +1,5 @@
-
+
netstandard2.0
true
@@ -21,11 +21,11 @@
Logo.png
README.md
-
+
-
+
diff --git a/MLEM.Templates/content/MLEM.Templates.DesktopGL/TemplateNamespace.csproj b/MLEM.Templates/content/MLEM.Templates.DesktopGL/TemplateNamespace.csproj
index 6786aac..009d159 100644
--- a/MLEM.Templates/content/MLEM.Templates.DesktopGL/TemplateNamespace.csproj
+++ b/MLEM.Templates/content/MLEM.Templates.DesktopGL/TemplateNamespace.csproj
@@ -1,5 +1,5 @@
-
+
Exe
net5.0
@@ -7,14 +7,14 @@
false
Icon.ico
-
+
-
+
diff --git a/MLEM.Templates/content/MLEM.Templates.Portable/TemplateNamespace.csproj b/MLEM.Templates/content/MLEM.Templates.Portable/TemplateNamespace.csproj
index ebc9fc0..d543373 100644
--- a/MLEM.Templates/content/MLEM.Templates.Portable/TemplateNamespace.csproj
+++ b/MLEM.Templates/content/MLEM.Templates.Portable/TemplateNamespace.csproj
@@ -1,9 +1,9 @@
-
+
netstandard2.0
-
+
diff --git a/MLEM.Ui/Elements/Dropdown.cs b/MLEM.Ui/Elements/Dropdown.cs
index 9fd32ca..185c1c5 100644
--- a/MLEM.Ui/Elements/Dropdown.cs
+++ b/MLEM.Ui/Elements/Dropdown.cs
@@ -13,7 +13,7 @@ namespace MLEM.Ui.Elements {
/// The panel that this dropdown contains. It will be displayed upon pressing the dropdown button.
///
public readonly Panel Panel;
-
+
///
/// This property stores whether the dropdown is currently opened or not
///
diff --git a/MLEM.Ui/Elements/SpriteAnimationImage.cs b/MLEM.Ui/Elements/SpriteAnimationImage.cs
index 6d23131..486faa6 100644
--- a/MLEM.Ui/Elements/SpriteAnimationImage.cs
+++ b/MLEM.Ui/Elements/SpriteAnimationImage.cs
@@ -32,9 +32,7 @@ namespace MLEM.Ui.Elements {
/// The image's size
/// The sprite group to display
/// Whether this image element should scale to the texture
- public SpriteAnimationImage(Anchor anchor, Vector2 size, SpriteAnimation animation, bool scaleToImage = false) :
- this(anchor, size, new SpriteAnimationGroup().Add(animation, () => true), scaleToImage) {
- }
+ public SpriteAnimationImage(Anchor anchor, Vector2 size, SpriteAnimation animation, bool scaleToImage = false) : this(anchor, size, new SpriteAnimationGroup().Add(animation, () => true), scaleToImage) {}
///
public override void Update(GameTime time) {
diff --git a/MLEM.Ui/Elements/SquishingGroup.cs b/MLEM.Ui/Elements/SquishingGroup.cs
index fe8acda..46870a3 100644
--- a/MLEM.Ui/Elements/SquishingGroup.cs
+++ b/MLEM.Ui/Elements/SquishingGroup.cs
@@ -16,8 +16,7 @@ namespace MLEM.Ui.Elements {
///
/// The group's anchor.
/// The group's size.
- public SquishingGroup(Anchor anchor, Vector2 size) : base(anchor, size, false) {
- }
+ public SquishingGroup(Anchor anchor, Vector2 size) : base(anchor, size, false) {}
///
public override void SetAreaAndUpdateChildren(RectangleF area) {
diff --git a/MLEM.Ui/MLEM.Ui.csproj b/MLEM.Ui/MLEM.Ui.csproj
index 48290cc..91610a2 100644
--- a/MLEM.Ui/MLEM.Ui.csproj
+++ b/MLEM.Ui/MLEM.Ui.csproj
@@ -4,7 +4,7 @@
true
true
-
+
Ellpeck
A mouse, keyboard, gamepad and touch ready Ui system that features automatic anchoring, sizing and several ready-to-use element types
@@ -16,16 +16,16 @@
Logo.png
README.md
-
+
-
+
all
-
+
diff --git a/MLEM.Ui/Style/StyleProp.cs b/MLEM.Ui/Style/StyleProp.cs
index 8106160..5dac89d 100644
--- a/MLEM.Ui/Style/StyleProp.cs
+++ b/MLEM.Ui/Style/StyleProp.cs
@@ -27,8 +27,7 @@ namespace MLEM.Ui.Style {
/// To create a style property with a lower priority, use on an existing priority, or use .
///
/// The custom style to apply
- public StyleProp(T value) : this(value, byte.MaxValue) {
- }
+ public StyleProp(T value) : this(value, byte.MaxValue) {}
private StyleProp(T value, byte priority) {
this.Value = value;
diff --git a/MLEM.Ui/UiSystem.cs b/MLEM.Ui/UiSystem.cs
index aee05d9..9c11bbc 100644
--- a/MLEM.Ui/UiSystem.cs
+++ b/MLEM.Ui/UiSystem.cs
@@ -380,21 +380,65 @@ namespace MLEM.Ui {
root.Element.AndChildren(action);
}
- internal void InvokeOnElementDrawn(Element element, GameTime time, SpriteBatch batch, float alpha) => this.OnElementDrawn?.Invoke(element, time, batch, alpha);
- internal void InvokeOnSelectedElementDrawn(Element element, GameTime time, SpriteBatch batch, float alpha) => this.OnSelectedElementDrawn?.Invoke(element, time, batch, alpha);
- internal void InvokeOnElementUpdated(Element element, GameTime time) => this.OnElementUpdated?.Invoke(element, time);
- internal void InvokeOnElementAreaUpdated(Element element) => this.OnElementAreaUpdated?.Invoke(element);
- internal void InvokeOnElementPressed(Element element) => this.OnElementPressed?.Invoke(element);
- internal void InvokeOnElementSecondaryPressed(Element element) => this.OnElementSecondaryPressed?.Invoke(element);
- internal void InvokeOnElementSelected(Element element) => this.OnElementSelected?.Invoke(element);
- internal void InvokeOnElementDeselected(Element element) => this.OnElementDeselected?.Invoke(element);
- internal void InvokeOnSelectedElementChanged(Element element) => this.OnSelectedElementChanged?.Invoke(element);
- internal void InvokeOnElementMouseExit(Element element) => this.OnElementMouseExit?.Invoke(element);
- internal void InvokeOnElementMouseEnter(Element element) => this.OnElementMouseEnter?.Invoke(element);
- internal void InvokeOnMousedElementChanged(Element element) => this.OnMousedElementChanged?.Invoke(element);
- internal void InvokeOnElementTouchExit(Element element) => this.OnElementTouchExit?.Invoke(element);
- internal void InvokeOnElementTouchEnter(Element element) => this.OnElementTouchEnter?.Invoke(element);
- internal void InvokeOnTouchedElementChanged(Element element) => this.OnTouchedElementChanged?.Invoke(element);
+ internal void InvokeOnElementDrawn(Element element, GameTime time, SpriteBatch batch, float alpha) {
+ this.OnElementDrawn?.Invoke(element, time, batch, alpha);
+ }
+
+ internal void InvokeOnSelectedElementDrawn(Element element, GameTime time, SpriteBatch batch, float alpha) {
+ this.OnSelectedElementDrawn?.Invoke(element, time, batch, alpha);
+ }
+
+ internal void InvokeOnElementUpdated(Element element, GameTime time) {
+ this.OnElementUpdated?.Invoke(element, time);
+ }
+
+ internal void InvokeOnElementAreaUpdated(Element element) {
+ this.OnElementAreaUpdated?.Invoke(element);
+ }
+
+ internal void InvokeOnElementPressed(Element element) {
+ this.OnElementPressed?.Invoke(element);
+ }
+
+ internal void InvokeOnElementSecondaryPressed(Element element) {
+ this.OnElementSecondaryPressed?.Invoke(element);
+ }
+
+ internal void InvokeOnElementSelected(Element element) {
+ this.OnElementSelected?.Invoke(element);
+ }
+
+ internal void InvokeOnElementDeselected(Element element) {
+ this.OnElementDeselected?.Invoke(element);
+ }
+
+ internal void InvokeOnSelectedElementChanged(Element element) {
+ this.OnSelectedElementChanged?.Invoke(element);
+ }
+
+ internal void InvokeOnElementMouseExit(Element element) {
+ this.OnElementMouseExit?.Invoke(element);
+ }
+
+ internal void InvokeOnElementMouseEnter(Element element) {
+ this.OnElementMouseEnter?.Invoke(element);
+ }
+
+ internal void InvokeOnMousedElementChanged(Element element) {
+ this.OnMousedElementChanged?.Invoke(element);
+ }
+
+ internal void InvokeOnElementTouchExit(Element element) {
+ this.OnElementTouchExit?.Invoke(element);
+ }
+
+ internal void InvokeOnElementTouchEnter(Element element) {
+ this.OnElementTouchEnter?.Invoke(element);
+ }
+
+ internal void InvokeOnTouchedElementChanged(Element element) {
+ this.OnTouchedElementChanged?.Invoke(element);
+ }
///
/// A delegate used for callbacks that involve a
@@ -534,10 +578,21 @@ namespace MLEM.Ui {
this.Transform = Matrix.CreateScale(scale, scale, 1) * Matrix.CreateTranslation(new Vector3((1 - scale) * (origin ?? this.Element.DisplayArea.Center), 0));
}
- internal void InvokeOnElementAdded(Element element) => this.OnElementAdded?.Invoke(element);
- internal void InvokeOnElementRemoved(Element element) => this.OnElementRemoved?.Invoke(element);
- internal void InvokeOnAddedToUi(UiSystem system) => this.OnAddedToUi?.Invoke(system);
- internal void InvokeOnRemovedFromUi(UiSystem system) => this.OnRemovedFromUi?.Invoke(system);
+ internal void InvokeOnElementAdded(Element element) {
+ this.OnElementAdded?.Invoke(element);
+ }
+
+ internal void InvokeOnElementRemoved(Element element) {
+ this.OnElementRemoved?.Invoke(element);
+ }
+
+ internal void InvokeOnAddedToUi(UiSystem system) {
+ this.OnAddedToUi?.Invoke(system);
+ }
+
+ internal void InvokeOnRemovedFromUi(UiSystem system) {
+ this.OnRemovedFromUi?.Invoke(system);
+ }
}
}
\ No newline at end of file
diff --git a/MLEM/Animations/SpriteAnimation.cs b/MLEM/Animations/SpriteAnimation.cs
index af21b8f..8fdfead 100644
--- a/MLEM/Animations/SpriteAnimation.cs
+++ b/MLEM/Animations/SpriteAnimation.cs
@@ -103,18 +103,14 @@ namespace MLEM.Animations {
///
/// The amount of time that each frame should last for
/// The texture regions that should make up this animation
- public SpriteAnimation(double timePerFrame, params TextureRegion[] regions) :
- this(Array.ConvertAll(regions, r => new AnimationFrame(timePerFrame, r))) {
- }
+ public SpriteAnimation(double timePerFrame, params TextureRegion[] regions) : this(Array.ConvertAll(regions, r => new AnimationFrame(timePerFrame, r))) {}
///
/// Creates a new sprite animation that contains the given texture region arrays as frames, where each frame represents one set of texture regions.
///
/// The amount of time that each frame should last for
/// The texture regions that should make up this animation
- public SpriteAnimation(double timePerFrame, params TextureRegion[][] regions) :
- this(Array.ConvertAll(regions, r => new AnimationFrame(timePerFrame, r))) {
- }
+ public SpriteAnimation(double timePerFrame, params TextureRegion[][] regions) : this(Array.ConvertAll(regions, r => new AnimationFrame(timePerFrame, r))) {}
///
/// Creates a new sprite animation based on the given texture regions in rectangle-based format.
@@ -122,9 +118,7 @@ namespace MLEM.Animations {
/// The amount of time that each frame should last for
/// The texture that the regions should come from
/// The texture regions that should make up this animation
- public SpriteAnimation(double timePerFrame, Texture2D texture, params Rectangle[] regions) :
- this(timePerFrame, Array.ConvertAll(regions, r => new TextureRegion(texture, r))) {
- }
+ public SpriteAnimation(double timePerFrame, Texture2D texture, params Rectangle[] regions) : this(timePerFrame, Array.ConvertAll(regions, r => new TextureRegion(texture, r))) {}
///
/// Updates this animation, causing to be increased and the to be updated.
diff --git a/MLEM/Extensions/ColorExtensions.cs b/MLEM/Extensions/ColorExtensions.cs
index 5095888..19f33f6 100644
--- a/MLEM/Extensions/ColorExtensions.cs
+++ b/MLEM/Extensions/ColorExtensions.cs
@@ -50,7 +50,7 @@ namespace MLEM.Extensions {
/// The number to parse.
/// The resulting color.
public static Color FromHexRgba(int value) {
- return new Color(value >> 16 & 0xFF, value >> 8 & 0xFF, value >> 0 & 0xFF, value >> 24 & 0xFF);
+ return new Color((value >> 16) & 0xFF, (value >> 8) & 0xFF, (value >> 0) & 0xFF, (value >> 24) & 0xFF);
}
///
@@ -60,7 +60,7 @@ namespace MLEM.Extensions {
/// The number to parse.
/// The resulting color.
public static Color FromHexRgb(int value) {
- return new Color(value >> 16 & 0xFF, value >> 8 & 0xFF, value >> 0 & 0xFF);
+ return new Color((value >> 16) & 0xFF, (value >> 8) & 0xFF, (value >> 0) & 0xFF);
}
///
diff --git a/MLEM/Formatting/Codes/AnimatedCode.cs b/MLEM/Formatting/Codes/AnimatedCode.cs
index 1ddd4be..ab7b777 100644
--- a/MLEM/Formatting/Codes/AnimatedCode.cs
+++ b/MLEM/Formatting/Codes/AnimatedCode.cs
@@ -5,8 +5,7 @@ namespace MLEM.Formatting.Codes {
public class AnimatedCode : Code {
///
- public AnimatedCode(Match match, Regex regex) : base(match, regex) {
- }
+ public AnimatedCode(Match match, Regex regex) : base(match, regex) {}
///
public override bool EndsHere(Code other) {
diff --git a/MLEM/Formatting/Codes/Code.cs b/MLEM/Formatting/Codes/Code.cs
index 2ffd8e8..f08f075 100644
--- a/MLEM/Formatting/Codes/Code.cs
+++ b/MLEM/Formatting/Codes/Code.cs
@@ -58,8 +58,7 @@ namespace MLEM.Formatting.Codes {
/// Update this formatting code's animations etc.
///
/// The game's time
- public virtual void Update(GameTime time) {
- }
+ public virtual void Update(GameTime time) {}
///
/// Returns the string that this formatting code should be replaced with.
@@ -77,8 +76,7 @@ namespace MLEM.Formatting.Codes {
}
///
- public virtual void DrawSelf(GameTime time, SpriteBatch batch, Vector2 pos, GenericFont font, Color color, float scale, float depth) {
- }
+ public virtual void DrawSelf(GameTime time, SpriteBatch batch, Vector2 pos, GenericFont font, Color color, float scale, float depth) {}
///
/// Creates a new formatting code from the given regex and regex match.
diff --git a/MLEM/Formatting/Codes/ResetFormattingCode.cs b/MLEM/Formatting/Codes/ResetFormattingCode.cs
index 0a1103b..966a4dd 100644
--- a/MLEM/Formatting/Codes/ResetFormattingCode.cs
+++ b/MLEM/Formatting/Codes/ResetFormattingCode.cs
@@ -5,8 +5,7 @@ namespace MLEM.Formatting.Codes {
public class ResetFormattingCode : Code {
///
- public ResetFormattingCode(Match match, Regex regex) : base(match, regex) {
- }
+ public ResetFormattingCode(Match match, Regex regex) : base(match, regex) {}
///
public override bool EndsHere(Code other) {
diff --git a/MLEM/Input/InputHandler.cs b/MLEM/Input/InputHandler.cs
index 1f239ce..db55cc8 100644
--- a/MLEM/Input/InputHandler.cs
+++ b/MLEM/Input/InputHandler.cs
@@ -419,9 +419,10 @@ namespace MLEM.Input {
///
public bool IsGamepadButtonDown(Buttons button, int index = -1) {
if (index < 0) {
- for (var i = 0; i < this.ConnectedGamepads; i++)
+ for (var i = 0; i < this.ConnectedGamepads; i++) {
if (this.GetGamepadState(i).IsButtonDown(button))
return true;
+ }
return false;
}
return this.GetGamepadState(index).IsButtonDown(button);
@@ -430,9 +431,10 @@ namespace MLEM.Input {
///
public bool IsGamepadButtonUp(Buttons button, int index = -1) {
if (index < 0) {
- for (var i = 0; i < this.ConnectedGamepads; i++)
+ for (var i = 0; i < this.ConnectedGamepads; i++) {
if (this.GetGamepadState(i).IsButtonUp(button))
return true;
+ }
return false;
}
return this.GetGamepadState(index).IsButtonUp(button);
@@ -441,9 +443,10 @@ namespace MLEM.Input {
///
public bool WasGamepadButtonDown(Buttons button, int index = -1) {
if (index < 0) {
- for (var i = 0; i < this.ConnectedGamepads; i++)
+ for (var i = 0; i < this.ConnectedGamepads; i++) {
if (this.GetLastGamepadState(i).IsButtonDown(button))
return true;
+ }
return false;
}
return this.GetLastGamepadState(index).IsButtonDown(button);
@@ -452,9 +455,10 @@ namespace MLEM.Input {
///
public bool WasGamepadButtonUp(Buttons button, int index = -1) {
if (index < 0) {
- for (var i = 0; i < this.ConnectedGamepads; i++)
+ for (var i = 0; i < this.ConnectedGamepads; i++) {
if (this.GetLastGamepadState(i).IsButtonUp(button))
return true;
+ }
return false;
}
return this.GetLastGamepadState(index).IsButtonUp(button);
@@ -471,9 +475,10 @@ namespace MLEM.Input {
public bool IsGamepadButtonPressed(Buttons button, int index = -1) {
if (this.HandleGamepadRepeats) {
if (index < 0) {
- for (var i = 0; i < this.ConnectedGamepads; i++)
+ for (var i = 0; i < this.ConnectedGamepads; i++) {
if (this.heldGamepadButtons[i] == button && this.triggerGamepadButtonRepeat[i])
return true;
+ }
} else if (this.heldGamepadButtons[index] == button && this.triggerGamepadButtonRepeat[index]) {
return true;
}
diff --git a/MLEM/Input/Keybind.cs b/MLEM/Input/Keybind.cs
index 69cd824..ca8e28c 100644
--- a/MLEM/Input/Keybind.cs
+++ b/MLEM/Input/Keybind.cs
@@ -32,8 +32,7 @@ namespace MLEM.Input {
///
/// Creates a new keybind with no default combinations
///
- public Keybind() {
- }
+ public Keybind() {}
///
/// Adds a new key combination to this keybind that can optionally be pressed for the keybind to trigger.
diff --git a/MLEM/MLEM.csproj b/MLEM/MLEM.csproj
index f255cc5..302d3ca 100644
--- a/MLEM/MLEM.csproj
+++ b/MLEM/MLEM.csproj
@@ -4,7 +4,7 @@
true
true
-
+
Ellpeck
MLEM Library for Extending MonoGame provides extension methods and additional features for MonoGame
@@ -16,13 +16,13 @@
Logo.png
README.md
-
+
all
-
+
diff --git a/MLEM/Misc/MlemPlatform.cs b/MLEM/Misc/MlemPlatform.cs
index 10914b1..8141104 100644
--- a/MLEM/Misc/MlemPlatform.cs
+++ b/MLEM/Misc/MlemPlatform.cs
@@ -140,8 +140,7 @@ namespace MLEM.Misc {
}
///
- public override void AddTextInputListener(GameWindow window, TextInputCallback callback) {
- }
+ public override void AddTextInputListener(GameWindow window, TextInputCallback callback) {}
///
public override void OpenLinkOrFile(string link) {
@@ -172,12 +171,10 @@ namespace MLEM.Misc {
}
///
- public override void AddTextInputListener(GameWindow window, TextInputCallback callback) {
- }
+ public override void AddTextInputListener(GameWindow window, TextInputCallback callback) {}
///
- public override void OpenLinkOrFile(string link) {
- }
+ public override void OpenLinkOrFile(string link) {}
}
diff --git a/MLEM/Misc/Padding.cs b/MLEM/Misc/Padding.cs
index 44692c9..1dcd96b 100644
--- a/MLEM/Misc/Padding.cs
+++ b/MLEM/Misc/Padding.cs
@@ -62,27 +62,21 @@ namespace MLEM.Misc {
/// Creates a new padding with the specified value, which will be applied to each edge.
///
/// The padding to apply to each edge
- public Padding(float value) :
- this(value, value) {
- }
+ public Padding(float value) : this(value, value) {}
///
/// Creates a new padding with the specified x and y values, applying them to both edges.
///
/// The x padding, which will turn into the left and right padding
/// The y padding, which till turn into the top and bottom padding
- public Padding(float x, float y) :
- this(x, x, y, y) {
- }
+ public Padding(float x, float y) : this(x, x, y, y) {}
///
/// Creates a new padding from an existing padding, modifying it by growing or shrinking it.
///
/// The padding whose initial values to use
/// The amount to grow each border by. Negative values will shrink the padding.
- public Padding(Padding padding, float growth) :
- this(padding.Left + growth, padding.Right + growth, padding.Top + growth, padding.Bottom + growth) {
- }
+ public Padding(Padding padding, float growth) : this(padding.Left + growth, padding.Right + growth, padding.Top + growth, padding.Bottom + growth) {}
///
/// Implicitly creates a padding from the given two-dimensional vector.
diff --git a/MLEM/Pathfinding/AStar2.cs b/MLEM/Pathfinding/AStar2.cs
index a30f56e..a0772c6 100644
--- a/MLEM/Pathfinding/AStar2.cs
+++ b/MLEM/Pathfinding/AStar2.cs
@@ -14,8 +14,7 @@ namespace MLEM.Pathfinding {
///
public AStar2(GetCost defaultCostFunction, bool defaultAllowDiagonals, float defaultCost = 1, int defaultMaxTries = 10000) :
- base(AllDirs, AdjacentDirs, defaultCostFunction, defaultAllowDiagonals, defaultCost, defaultMaxTries) {
- }
+ base(AllDirs, AdjacentDirs, defaultCostFunction, defaultAllowDiagonals, defaultCost, defaultMaxTries) {}
///
protected override Point AddPositions(Point first, Point second) {
diff --git a/MLEM/Pathfinding/AStar3.cs b/MLEM/Pathfinding/AStar3.cs
index ca7e1a4..7c90908 100644
--- a/MLEM/Pathfinding/AStar3.cs
+++ b/MLEM/Pathfinding/AStar3.cs
@@ -35,8 +35,7 @@ namespace MLEM.Pathfinding {
///
public AStar3(GetCost defaultCostFunction, bool defaultAllowDiagonals, float defaultCost = 1, int defaultMaxTries = 10000) :
- base(AllDirs, AdjacentDirs, defaultCostFunction, defaultAllowDiagonals, defaultCost, defaultMaxTries) {
- }
+ base(AllDirs, AdjacentDirs, defaultCostFunction, defaultAllowDiagonals, defaultCost, defaultMaxTries) {}
///
protected override Vector3 AddPositions(Vector3 first, Vector3 second) {
diff --git a/MLEM/Textures/NinePatch.cs b/MLEM/Textures/NinePatch.cs
index 18c8645..aadfda9 100644
--- a/MLEM/Textures/NinePatch.cs
+++ b/MLEM/Textures/NinePatch.cs
@@ -53,14 +53,10 @@ namespace MLEM.Textures {
/// The padding on the top edge
/// The padding on the bottom edge
/// The mode to use for drawing this nine patch, defaults to
- public NinePatch(TextureRegion texture, int paddingLeft, int paddingRight, int paddingTop, int paddingBottom, NinePatchMode mode = NinePatchMode.Stretch) :
- this(texture, new Padding(paddingLeft, paddingRight, paddingTop, paddingBottom), mode) {
- }
+ public NinePatch(TextureRegion texture, int paddingLeft, int paddingRight, int paddingTop, int paddingBottom, NinePatchMode mode = NinePatchMode.Stretch) : this(texture, new Padding(paddingLeft, paddingRight, paddingTop, paddingBottom), mode) {}
///
- public NinePatch(Texture2D texture, int paddingLeft, int paddingRight, int paddingTop, int paddingBottom, NinePatchMode mode = NinePatchMode.Stretch) :
- this(new TextureRegion(texture), paddingLeft, paddingRight, paddingTop, paddingBottom, mode) {
- }
+ public NinePatch(Texture2D texture, int paddingLeft, int paddingRight, int paddingTop, int paddingBottom, NinePatchMode mode = NinePatchMode.Stretch) : this(new TextureRegion(texture), paddingLeft, paddingRight, paddingTop, paddingBottom, mode) {}
///
/// Creates a new nine patch from a texture and a uniform padding
@@ -68,14 +64,10 @@ namespace MLEM.Textures {
/// The texture to use
/// The padding that each edge should have
/// The mode to use for drawing this nine patch, defaults to
- public NinePatch(Texture2D texture, int padding, NinePatchMode mode = NinePatchMode.Stretch) :
- this(new TextureRegion(texture), padding, mode) {
- }
+ public NinePatch(Texture2D texture, int padding, NinePatchMode mode = NinePatchMode.Stretch) : this(new TextureRegion(texture), padding, mode) {}
///
- public NinePatch(TextureRegion texture, int padding, NinePatchMode mode = NinePatchMode.Stretch) :
- this(texture, padding, padding, padding, padding, mode) {
- }
+ public NinePatch(TextureRegion texture, int padding, NinePatchMode mode = NinePatchMode.Stretch) : this(texture, padding, padding, padding, padding, mode) {}
internal RectangleF GetRectangleForIndex(RectangleF area, int index, float patchScale = 1) {
var pl = this.Padding.Left * patchScale;
diff --git a/MLEM/Textures/TextureRegion.cs b/MLEM/Textures/TextureRegion.cs
index ecb6569..ab9f875 100644
--- a/MLEM/Textures/TextureRegion.cs
+++ b/MLEM/Textures/TextureRegion.cs
@@ -73,9 +73,7 @@ namespace MLEM.Textures {
/// Creates a new texture region that spans the entire texture
///
/// The texture to use
- public TextureRegion(Texture2D texture) :
- this(texture, new Rectangle(0, 0, texture.Width, texture.Height)) {
- }
+ public TextureRegion(Texture2D texture) : this(texture, new Rectangle(0, 0, texture.Width, texture.Height)) {}
///
/// Creates a new texture region based on a texture and area coordinates
@@ -85,9 +83,7 @@ namespace MLEM.Textures {
/// The y coordinate of the top left corner of this area
/// The width of this area
/// The height of this area
- public TextureRegion(Texture2D texture, int u, int v, int width, int height) :
- this(texture, new Rectangle(u, v, width, height)) {
- }
+ public TextureRegion(Texture2D texture, int u, int v, int width, int height) : this(texture, new Rectangle(u, v, width, height)) {}
///
/// Creates a new texture region based on a texture, a position and a size
@@ -95,18 +91,14 @@ namespace MLEM.Textures {
/// The texture to use
/// The top left corner of this area
/// The size of this area
- public TextureRegion(Texture2D texture, Point uv, Point size) :
- this(texture, new Rectangle(uv, size)) {
- }
+ public TextureRegion(Texture2D texture, Point uv, Point size) : this(texture, new Rectangle(uv, size)) {}
///
/// Creates a new texture region which is a sub-region of the given texture region
///
/// The texture region to create a sub-region of
/// The new texture region area
- public TextureRegion(TextureRegion region, Rectangle area) :
- this(region, area.Location, area.Size) {
- }
+ public TextureRegion(TextureRegion region, Rectangle area) : this(region, area.Location, area.Size) {}
///
/// Creates a new texture region which is a sub-region of the given texture region
@@ -116,9 +108,7 @@ namespace MLEM.Textures {
/// The y coordinate of the top left corner of this area
/// The width of this area
/// The height of this area
- public TextureRegion(TextureRegion region, int u, int v, int width, int height) :
- this(region, new Point(u, v), new Point(width, height)) {
- }
+ public TextureRegion(TextureRegion region, int u, int v, int width, int height) : this(region, new Point(u, v), new Point(width, height)) {}
///
/// Creates a new texture region which is a sub-region of the given texture region
@@ -126,9 +116,7 @@ namespace MLEM.Textures {
/// The texture region to create a sub-region of
/// The top left corner of this area
/// The size of this area
- public TextureRegion(TextureRegion region, Point uv, Point size) :
- this(region.Texture, region.Position + uv, size) {
- }
+ public TextureRegion(TextureRegion region, Point uv, Point size) : this(region.Texture, region.Position + uv, size) {}
}
diff --git a/MLEM/Textures/UniformTextureAtlas.cs b/MLEM/Textures/UniformTextureAtlas.cs
index 3526700..e4a1044 100644
--- a/MLEM/Textures/UniformTextureAtlas.cs
+++ b/MLEM/Textures/UniformTextureAtlas.cs
@@ -82,9 +82,7 @@ namespace MLEM.Textures {
/// The texture to use for this atlas
/// The amount of texture regions in the x direction
/// The amount of texture regions in the y direction
- public UniformTextureAtlas(Texture2D texture, int regionAmountX, int regionAmountY) :
- this(new TextureRegion(texture), regionAmountX, regionAmountY) {
- }
+ public UniformTextureAtlas(Texture2D texture, int regionAmountX, int regionAmountY) : this(new TextureRegion(texture), regionAmountX, regionAmountY) {}
private TextureRegion GetOrAddRegion(Rectangle rect) {
if (this.regions.TryGetValue(rect, out var region))
diff --git a/Sandbox/Content/Tiled/Map.tmx b/Sandbox/Content/Tiled/Map.tmx
index b0e1771..55745ce 100644
--- a/Sandbox/Content/Tiled/Map.tmx
+++ b/Sandbox/Content/Tiled/Map.tmx
@@ -1,274 +1,274 @@
diff --git a/Sandbox/Sandbox.csproj b/Sandbox/Sandbox.csproj
index 8dec0e4..f6607ef 100644
--- a/Sandbox/Sandbox.csproj
+++ b/Sandbox/Sandbox.csproj
@@ -1,10 +1,10 @@
-
+
Exe
net5.0
-
+
@@ -12,7 +12,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
diff --git a/Tests/DataTests.cs b/Tests/DataTests.cs
index 4d602f2..ef6a0e1 100644
--- a/Tests/DataTests.cs
+++ b/Tests/DataTests.cs
@@ -124,8 +124,7 @@ namespace Tests {
public Direction2 Dir { get; set; }
public TestObject OtherTest;
- public TestObject(Vector2 test, string test2) {
- }
+ public TestObject(Vector2 test, string test2) {}
protected bool Equals(TestObject other) {
return this.Vec.Equals(other.Vec) && this.Point.Equals(other.Point) && Equals(this.OtherTest, other.OtherTest) && this.Dir == other.Dir;
@@ -143,8 +142,7 @@ namespace Tests {
private class TestEnum : DynamicEnum {
- public TestEnum(string name, BigInteger value) : base(name, value) {
- }
+ public TestEnum(string name, BigInteger value) : base(name, value) {}
}
diff --git a/Tests/TestGame.cs b/Tests/TestGame.cs
index 0bc4688..22c8a02 100644
--- a/Tests/TestGame.cs
+++ b/Tests/TestGame.cs
@@ -8,8 +8,7 @@ namespace Tests {
public RawContentManager RawContent { get; private set; }
- private TestGame() {
- }
+ private TestGame() {}
protected override void LoadContent() {
base.LoadContent();
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index 557351e..39bd620 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -3,7 +3,7 @@
net5.0
nunit
-
+
@@ -14,8 +14,8 @@
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -24,8 +24,8 @@
-
- PreserveNewest
-
+
+ PreserveNewest
+
diff --git a/Tests/TexturePackerTests.cs b/Tests/TexturePackerTests.cs
index 2e18635..e16006a 100644
--- a/Tests/TexturePackerTests.cs
+++ b/Tests/TexturePackerTests.cs
@@ -80,8 +80,7 @@ namespace Tests {
Assert.AreEqual(170, packer4.PackedTexture.Height);
}
- private static void StubResult(TextureRegion region) {
- }
+ private static void StubResult(TextureRegion region) {}
}
}
\ No newline at end of file