1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-23 17:13:38 +02:00

made elements refer back to their controls for the selected element

This commit is contained in:
Ellpeck 2020-03-17 22:27:39 +01:00
parent d07f470da3
commit cd70b22ae5

View file

@ -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()) {