Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Nautilus/Utility/BasicText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public BasicText()
CloneFont = true;
CloneStyle = true;
CloneMaterial = true;
InitializeText();
}

/// <summary>
Expand All @@ -60,6 +61,7 @@ public BasicText(int set_x, int set_y) : this()
{
X = set_x;
Y = set_y;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unneeded since the base constructor calls InitializeText

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -70,6 +72,7 @@ public BasicText(TextAlignmentOptions useAlign) : this()
{
CloneAlign = false;
Align = useAlign;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -80,6 +83,7 @@ public BasicText(Color useColor) : this()
{
CloneColor = false;
Color = useColor;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -90,6 +94,7 @@ public BasicText(int useSize) : this()
{
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -103,6 +108,7 @@ public BasicText(int useSize, Color useColor) : this()
Color = useColor;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -116,6 +122,7 @@ public BasicText(int useSize, TextAlignmentOptions useAlign) : this()
Align = useAlign;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -132,6 +139,7 @@ public BasicText(int useSize, Color useColor, TextAlignmentOptions useAlign) : t
Color = useColor;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -152,6 +160,7 @@ public BasicText(int set_x, int set_y, int useSize, Color useColor, TextAlignmen
Color = useColor;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -169,6 +178,7 @@ public BasicText(int set_x, int set_y, int useSize, Color useColor) : this()
Color = useColor;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -183,6 +193,7 @@ public BasicText(int set_x, int set_y, int useSize) : this()
Y = set_y;
CloneSize = false;
Size = useSize;
InitializeText();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InitializeText();

}

/// <summary>
Expand All @@ -201,12 +212,6 @@ public void ShowMessage(string s)
/// <param name="seconds">The duration to hold before fading</param>
public void ShowMessage(string s, float seconds)
{
if (TextObject == null)
{
// First time only, initialize the object and components
InitializeText();
}

// Set our actual text
TextFade.SetText(s);

Expand Down