diff --git a/MmgEngine/Button.cs b/MmgEngine/Button.cs index 2557d45..a84eb1c 100644 --- a/MmgEngine/Button.cs +++ b/MmgEngine/Button.cs @@ -20,7 +20,7 @@ public class Button : DrawableGameComponent #endregion //Constructor - public Button(Game game, Rectangle actionBox, SimpleImage texture = null, Alignment anchor = Alignment.Center, bool enabled = true, bool hasHover = false) : base(game) + public Button(Game game, Rectangle actionBox, SimpleImage texture = null, Alignment anchor = Alignment.TopLeft, bool enabled = true, bool hasHover = false) : base(game) { actionBox.Location -= (actionBox.Size.ToVector2() * EngineStatics.Aligner(anchor)).ToPoint(); diff --git a/MmgEngine/HoverDetector.cs b/MmgEngine/HoverDetector.cs index 0bf26ee..5014697 100644 --- a/MmgEngine/HoverDetector.cs +++ b/MmgEngine/HoverDetector.cs @@ -10,7 +10,7 @@ public class HoverDetector : GameComponent public Rectangle ActionBox { get; private set; } public bool Hovering { get; private set; } - public HoverDetector(Game game, Rectangle actionBox, Alignment alignment = Alignment.Center, bool enabled = true) : base(game) + public HoverDetector(Game game, Rectangle actionBox, Alignment alignment = Alignment.TopLeft, bool enabled = true) : base(game) { actionBox.Location -= (actionBox.Size.ToVector2() * EngineStatics.Aligner(alignment)).ToPoint(); diff --git a/MmgEngine/SimpleImage.cs b/MmgEngine/SimpleImage.cs index e301bb8..4585e9d 100644 --- a/MmgEngine/SimpleImage.cs +++ b/MmgEngine/SimpleImage.cs @@ -21,7 +21,7 @@ public class SimpleImage : DrawableGameComponent public float Scale { get; set; } #endregion - public SimpleImage(Game game, Texture2D texture, Vector2 position, int layer, bool visible = true, Alignment anchor = Alignment.Center, Animation animation = null, Color? color = null, float opacity = 1f, float rotation = 0f, float scale = 1f) : base(game) + public SimpleImage(Game game, Texture2D texture, Vector2 position, int layer, bool visible = true, Alignment anchor = Alignment.TopCenter, Animation animation = null, Color? color = null, float opacity = 1f, float rotation = 0f, float scale = 1f) : base(game) { Texture = texture; Position = position; diff --git a/MmgEngine/TextComponent.cs b/MmgEngine/TextComponent.cs index a3b4ed8..5f0f1fa 100644 --- a/MmgEngine/TextComponent.cs +++ b/MmgEngine/TextComponent.cs @@ -23,7 +23,7 @@ public class TextComponent : DrawableGameComponent #endregion - public TextComponent(Game game, SpriteFont font, string defaultText, Vector2 position, int layer, bool visible = true, Alignment anchor = Alignment.CenterLeft, Color? color = null, float opacity = 1f, float rotation = 0f, float scale = 1f) : base(game) + public TextComponent(Game game, SpriteFont font, string defaultText, Vector2 position, int layer, bool visible = true, Alignment anchor = Alignment.TopLeft, Color? color = null, float opacity = 1f, float rotation = 0f, float scale = 1f) : base(game) { _font = font; Position = position;