C# Class MoodSwingGUI.MSFontScalingLabel

MSLabel is an MSGUIUnclickable component that displays text with the use of a SpriteFont. The text is always scaled to fit the bounding Rectangle of this MSLabel.
Inheritance: MSLabel
Show file Open project: verngutz/MoodSwing

Public Methods

Method Description
Draw ( GameTime gameTime ) : void
MSFontScalingLabel ( String text, Rectangle boundingRectangle, SpriteFont spriteFont, Color text_color, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System

Constructs a new MSLabel.

MSFontScalingLabel ( String text, Rectangle boundingRectangle, SpriteFont spriteFont, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System

Constructs a new MSLabel with default Color.Black text.

Method Details

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

MSFontScalingLabel() public method

Constructs a new MSLabel.
public MSFontScalingLabel ( String text, Rectangle boundingRectangle, SpriteFont spriteFont, Color text_color, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
text String the text that this MSLabel will display
boundingRectangle Microsoft.Xna.Framework.Rectangle the bounding Rectangle of this MSLabel
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont the SpriteFont used to draw the text
text_color Color
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the SpriteBatch that will draw this MSLabel
game Microsoft.Xna.Framework.Game the Game where this MSLabel is used
return System

MSFontScalingLabel() public method

Constructs a new MSLabel with default Color.Black text.
public MSFontScalingLabel ( String text, Rectangle boundingRectangle, SpriteFont spriteFont, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
text String the text that this MSLabel will display
boundingRectangle Microsoft.Xna.Framework.Rectangle the bounding Rectangle of this MSLabel
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont the SpriteFont used to draw the text
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the SpriteBatch that will draw this MSLabel
game Microsoft.Xna.Framework.Game the Game where this MSLabel is used
return System