Results 1 to 1 of 1

Thread: XNA spritebatch.drawstring() [RESOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2011
    Posts
    118

    XNA spritebatch.drawstring() [RESOLVED]

    Hi,

    I can't get my text drawn on the screen. My code gives a few errors.
    http://msdn.microsoft.com/en-us/library/ff433981.aspx

    Code:
    SBatch.Begin()
    SBatch.DrawString(GameFont, "X:" & P(MyIndex).X, New Vector2(10, 10), Color.Red)
    SBatch.End()
    Code:
    Public GameFont As SpriteFont
    Code:
    GameFont = OurContent.Content.Load(SpriteFont)("")
    can someone help me a bit more to get my text drawn?

    nevermind, got it:

    Code:
            GameFont = OurContent.Content.Load(Of SpriteFont)("Fonts\Normal")
    Last edited by jimpie; Oct 21st, 2011 at 04:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width