C# Class Myre.UI.Controls.Label

A control which draws glyphed text.
Changing the text, font or width will cause many string allocations. The label automatically sets it's size to that of its text when the text, justification or font changes.
Inheritance: Control
显示文件 Open project: TomGillen/Myre Class Usage Examples

Public Methods

Method Description
Draw ( SpriteBatch batch ) : void

Draws the control.

Label ( Control parent, SpriteFont font ) : System

Initializes a new instance of the Label class.

Private Methods

Method Description
UpdateSize ( ) : void

Method Details

Draw() public method

Draws the control.
public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch An spritebactch already started for alpha blending with deferred sort mode.
return void

Label() public method

Initializes a new instance of the Label class.
public Label ( Control parent, SpriteFont font ) : System
parent Control The parent.
font Microsoft.Xna.Framework.Graphics.SpriteFont The font.
return System