1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-10 19:38:43 +02:00

Ensure paragraphs display up-to-date versions of their text callbacks

This commit is contained in:
Ell 2022-12-16 20:03:19 +01:00
parent 14d0b24aa9
commit b3da8d35c0
2 changed files with 2 additions and 0 deletions

View file

@ -64,6 +64,7 @@ Improvements
- Generified UiMarkdownParser by adding abstract UiParser
- Multi-target net452, making MLEM compatible with MonoGame for consoles
- Added trimming and AOT annotations and made MLEM.Ui trimmable
- Ensure paragraphs display up-to-date versions of their text callbacks
Fixes
- Fixed parents of elements that prevent spill not being notified properly

View file

@ -149,6 +149,7 @@ namespace MLEM.Ui.Elements {
/// <inheritdoc />
public override void Draw(GameTime time, SpriteBatch batch, float alpha, SpriteBatchContext context) {
this.QueryTextCallback();
var pos = this.DisplayArea.Location + new Vector2(this.GetAlignmentOffset(), 0);
var sc = this.TextScale * this.TextScaleMultiplier * this.Scale;
var color = this.TextColor.OrDefault(Color.White) * alpha;