Files
MonoGame.Extended/Source/MonoGame.Extended.NuclexGui/Controls/GuiLabelControl.cs
T
Jon SeamanandDylan Wilson eb5fd93e9f Feature label styling (#454)
* Added some basic tests for the ECS

* Add test project for Nuclex Gui

* Nuclex Gui project update

* Added ability to style labels

* Removed Nuclex Gui Test project for lack of tests
2018-01-10 13:36:20 +10:00

34 lines
1.2 KiB
C#

namespace MonoGame.Extended.NuclexGui.Controls
{
/// <summary>Control that draws a block of text</summary>
public class GuiLabelControl : GuiControl
{
/// <summary>Text to be rendered in the control's frame</summary>
public string Text;
/// <summary>
/// Gets or sets the style to be used with this label when drawing.
/// </summary>
/// <remarks>
/// <para>
/// If you are using the FlatGuiVisualizer, this style
/// corresponds to the 'Frames' used in
/// <see cref="MonoGame.Extended.NuclexGui.Visuals.Flat.FlatGuiGraphics"/>
/// The style can be customized in the skin's json file.
/// </para>
/// </remarks>
public string Style { get; set; }
/// <summary>Initializes a new label control with an empty string</summary>
public GuiLabelControl() : this(string.Empty)
{
}
/// <summary>Initializes a new label control</summary>
/// <param name="text">Text to be printed at the location of the label control</param>
public GuiLabelControl(string text)
{
Text = text;
}
}
}