mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
fixed selected element looking bad with smooth scrolling
This commit is contained in:
parent
9df1b05bee
commit
e96b155f99
2 changed files with 2 additions and 2 deletions
|
@ -471,6 +471,8 @@ 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)
|
||||
this.System.OnSelectedElementDrawn?.Invoke(this, time, batch, alpha);
|
||||
|
||||
foreach (var child in this.GetRelevantChildren()) {
|
||||
if (!child.IsHidden)
|
||||
|
|
|
@ -121,8 +121,6 @@ namespace MLEM.Ui {
|
|||
batch.Begin(SpriteSortMode.Deferred, this.BlendState, this.SamplerState, null, null, null, root.Transform);
|
||||
var alpha = this.DrawAlpha * root.Element.DrawAlpha;
|
||||
root.Element.Draw(time, batch, alpha, this.BlendState, this.SamplerState, root.Transform);
|
||||
if (root.SelectedElement != null)
|
||||
this.OnSelectedElementDrawn?.Invoke(root.SelectedElement, time, batch, alpha);
|
||||
batch.End();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue