diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index b545b3d..f48fd4a 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -472,7 +472,7 @@ namespace MLEM.Ui.Elements { public virtual void Draw(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) { this.System.OnElementDrawn?.Invoke(this, time, batch, alpha); - if (this.Root.SelectedElement == this) + if (this.Controls.SelectedElement == this) this.System.OnSelectedElementDrawn?.Invoke(this, time, batch, alpha); foreach (var child in this.GetRelevantChildren()) {