1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 06:28:35 +01:00

fixed paragraphs not having their hidden property initialized at startup

This commit is contained in:
Ellpeck 2019-09-26 19:35:22 +02:00
parent 9e798f835c
commit 401a89e295

View file

@ -42,10 +42,14 @@ namespace MLEM.Ui.Elements {
: this(anchor, width, "", centerText) { : this(anchor, width, "", centerText) {
this.GetTextCallback = textCallback; this.GetTextCallback = textCallback;
this.Text = textCallback(this); this.Text = textCallback(this);
if (this.Text == null)
this.IsHidden = true;
} }
public Paragraph(Anchor anchor, float width, string text, bool centerText = false) : base(anchor, new Vector2(width, 0)) { public Paragraph(Anchor anchor, float width, string text, bool centerText = false) : base(anchor, new Vector2(width, 0)) {
this.text = text; this.Text = text;
if (this.Text == null)
this.IsHidden = true;
this.AutoAdjustWidth = centerText; this.AutoAdjustWidth = centerText;
this.CanBeSelected = false; this.CanBeSelected = false;
this.CanBeMoused = false; this.CanBeMoused = false;