mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-29 15:58:33 +01:00
fixed paragraphs not having their hidden property initialized at startup
This commit is contained in:
parent
9e798f835c
commit
401a89e295
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue