diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs
index f6b2e88..64602a7 100644
--- a/MLEM.Ui/Elements/Element.cs
+++ b/MLEM.Ui/Elements/Element.cs
@@ -395,8 +395,6 @@ namespace MLEM.Ui.Elements {
this.anchor = anchor;
this.size = size;
- // force BeginImpl to be reset to the default
- this.BeginImpl = null;
this.OnMouseEnter += element => this.IsMouseOver = true;
this.OnMouseExit += element => this.IsMouseOver = false;
this.OnTouchEnter += element => this.IsMouseOver = true;
@@ -833,7 +831,7 @@ namespace MLEM.Ui.Elements {
/// The blend state that is used for drawing
/// The sampler state that is used for drawing
/// The transformation matrix that is used for drawing
- public void DrawAll(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) {
+ public void DrawTransformed(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) {
var transform = this.Transform ?? this.TransformGetter(this, time, matrix);
var customDraw = this.BeginImpl != null || transform != Matrix.Identity;
var mat = matrix * transform;
@@ -874,7 +872,7 @@ namespace MLEM.Ui.Elements {
foreach (var child in this.GetRelevantChildren()) {
if (!child.IsHidden)
- child.DrawAll(time, batch, alpha * child.DrawAlpha, blendState, samplerState, matrix);
+ child.DrawTransformed(time, batch, alpha * child.DrawAlpha, blendState, samplerState, matrix);
}
}
@@ -1011,7 +1009,7 @@ namespace MLEM.Ui.Elements {
public delegate Element GamepadNextElementCallback(Direction2 dir, Element usualNext);
///
- /// A delegate method used for
+ /// A delegate method used for
///
/// The custom draw group
/// The game's time
@@ -1023,7 +1021,7 @@ namespace MLEM.Ui.Elements {
public delegate void BeginDelegate(Element element, GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix);
///
- /// A delegate method used for
+ /// A delegate method used for
///
/// The element whose transform to get
/// The game's time
diff --git a/MLEM.Ui/UiSystem.cs b/MLEM.Ui/UiSystem.cs
index 2f113a5..f0715b9 100644
--- a/MLEM.Ui/UiSystem.cs
+++ b/MLEM.Ui/UiSystem.cs
@@ -260,7 +260,7 @@ namespace MLEM.Ui {
continue;
batch.Begin(SpriteSortMode.Deferred, this.BlendState, this.SamplerState, null, null, null, root.Transform);
var alpha = this.DrawAlpha * root.Element.DrawAlpha;
- root.Element.DrawAll(time, batch, alpha, this.BlendState, this.SamplerState, root.Transform);
+ root.Element.DrawTransformed(time, batch, alpha, this.BlendState, this.SamplerState, root.Transform);
batch.End();
}
}