C# Class geek.GameEngine.Visuals.GameText

The class representing the text drawable on screen.
Inheritance: InteractableObject
Mostra file Open project: impworks/xna.geek.engine

Public Properties

Property Type Description
Font Microsoft.Xna.Framework.Graphics.SpriteFont

Protected Properties

Property Type Description
_HotSpot Microsoft.Xna.Framework.Vector2

Public Methods

Method Description
Draw ( SpriteBatch batch ) : void
GameText ( SpriteFont font, string text = "" ) : Microsoft.Xna.Framework
GameText ( string fontAsset, string text = "" ) : Microsoft.Xna.Framework
GetBoundingBox ( bool absolute = false ) : Rectangle

Protected Methods

Method Description
resetDimensions ( ) : void

Recalculate hot spot and scaling.

Method Details

Draw() public method

public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

GameText() public method

public GameText ( SpriteFont font, string text = "" ) : Microsoft.Xna.Framework
font Microsoft.Xna.Framework.Graphics.SpriteFont
text string
return Microsoft.Xna.Framework

GameText() public method

public GameText ( string fontAsset, string text = "" ) : Microsoft.Xna.Framework
fontAsset string
text string
return Microsoft.Xna.Framework

GetBoundingBox() public method

public GetBoundingBox ( bool absolute = false ) : Rectangle
absolute bool
return Microsoft.Xna.Framework.Rectangle

resetDimensions() protected method

Recalculate hot spot and scaling.
protected resetDimensions ( ) : void
return void

Property Details

Font public_oe property

Gets or sets the font of the text.
public SpriteFont,Microsoft.Xna.Framework.Graphics Font
return Microsoft.Xna.Framework.Graphics.SpriteFont

_HotSpot protected_oe property

The text hotspot defined by text alignment.
protected Vector2,Microsoft.Xna.Framework _HotSpot
return Microsoft.Xna.Framework.Vector2