Midnight Blue Game and Engine
Public Member Functions | List of all members
MB2D.UI.Label Class Reference

A static UIElement with a TextContent, border and optional texture More...

Inheritance diagram for MB2D.UI.Label:
Inheritance graph
Collaboration diagram for MB2D.UI.Label:
Collaboration graph

Public Member Functions

 Label ()
 Initializes a new instance of the T:MB2D.UI.Label class. More...
 
override void Draw (SpriteBatch spriteBatch)
 Draw the label to the window. More...
 
override void Update ()
 Updates the labels state More...
 
- Public Member Functions inherited from MB2D.UI.UIElement
void SetRelativeSize (UIContent parent, Point at, Point span)
 Sets the size of the element relative to its parent More...
 
void SetRelativeSize (UIContent parent, int atRow, int atCol, int rowSpan, int colSpan)
 Sets the size of the element relative to its parent More...
 

Additional Inherited Members

- Protected Member Functions inherited from MB2D.UI.UIElement
 UIElement (int rows, int cols)
 Initializes a new instance of the T:MB2D.UI.UIElement class. Sets default property values More...
 
void DrawBorder (SpriteBatch spriteBatch)
 Draws the elements border to the window. Skips sides that have color set to Color.Transparent More...
 
- Properties inherited from MB2D.UI.UIElement
UIContent Content [get]
 Gets the UIContent of the element, only available in container elements More...
 
Vector2 Size [get]
 Gets the column and row count of the element More...
 
Rectangle BoundingBox [get]
 Gets the bounding box of this element More...
 
bool Fill [get, set]
 Gets or sets a value that indicates the element should be stretched or shrunk to fill its parents bounds exactly More...
 
Color BackgroundColor [get, set]
 Gets or sets the color of the elements background. More...
 
string TextContent [get, set]
 Gets or sets the string rendered by the element. More...
 
Color TextColor [get, set]
 Gets or sets the current color of the text. More...
 
SpriteFont Font [get, set]
 Gets or sets the font used in rendering the elements TextContent More...
 
bool BorderDisplayed [get, set]
 Gets or sets a value indicating whether this T:MB2D.UI.UIElement has itsborder displayed. More...
 
int BorderWidth [get, set]
 Gets or sets the width of the border. More...
 
Color BorderColor [get, set]
 Gets or sets the color of the border. More...
 
Color BorderTopColor [get, set]
 Gets or sets the color of the border top. More...
 
Color BorderRightColor [get, set]
 Gets or sets the color of the border right. More...
 
Color BorderBottomColor [get, set]
 Gets or sets the color of the border bottom. More...
 
Color BorderLeftColor [get, set]
 Gets or sets the color of the border left. More...
 
string Tag [get, set]
 Gets or sets the tag used to quickly access this element and uniquely identify it. More...
 

Detailed Description

A static UIElement with a TextContent, border and optional texture

Constructor & Destructor Documentation

§ Label()

MB2D.UI.Label.Label ( )
inline

Initializes a new instance of the T:MB2D.UI.Label class.

Member Function Documentation

§ Draw()

override void MB2D.UI.Label.Draw ( SpriteBatch  spriteBatch)
inlinevirtual

Draw the label to the window.

Parameters
spriteBatchSprite batch to draw to.

Reimplemented from MB2D.UI.UIElement.

§ Update()

override void MB2D.UI.Label.Update ( )
inlinevirtual

Updates the labels state

Implements MB2D.UI.UIElement.


The documentation for this class was generated from the following file: