0
votes
1answer
78 views

How do I right-align text?

I'm using SpriteBatch.DrawString, which seems to not have an overload for text alignment. How can I draw aligned text?
3
votes
1answer
96 views

center point of a text?

i'm drawing a text using a spritefont and the draw.string function of the spritebatch object. in some point, i need to augment the size of the text, so i use a variable to scale it. all this is ...
5
votes
4answers
3k views

How to clip cut-off text in a textbox?

I'm writing a textbox class for my XNA game and I'm using SpriteFont to draw the text. It's only a single line textbox so when the text width exceeds the size of the rectangle box, it currently just ...