1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01:00

made all groups update their areas manually since they don't draw it

This commit is contained in:
Ellpeck 2019-12-29 15:25:33 +01:00
parent 31d805fc04
commit bbdb424cbe
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,5 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MLEM.Ui.Elements { namespace MLEM.Ui.Elements {
public class Group : Element { public class Group : Element {
@ -8,5 +9,10 @@ namespace MLEM.Ui.Elements {
this.CanBeSelected = false; this.CanBeSelected = false;
} }
public override void Draw(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) {
this.UpdateAreaIfDirty();
base.Draw(time, batch, alpha, blendState, samplerState, matrix);
}
} }
} }

View file

@ -35,7 +35,6 @@ namespace MLEM.Ui.Elements {
public override void Update(GameTime time) { public override void Update(GameTime time) {
base.Update(time); base.Update(time);
this.SnapPositionToMouse(); this.SnapPositionToMouse();
this.UpdateAreaIfDirty();
} }
public override void ForceUpdateArea() { public override void ForceUpdateArea() {