XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

getting the rectangle of drawn text

Last post 2/23/2009 1:51 AM by Ebola0001. 2 replies.
  • 2/23/2009 1:07 AM

    getting the rectangle of drawn text

    hey guys, first post here, i am drawing my menu on the screen using a sprite font draw command, how do i get the rectangle it draws into for testing mouse over and clicking.

    i can hard code it but the amount of things I'm gonna need to be able to click on text wise makes that unwieldy

    :) thanks guys.
    Quando Omni Flunkus Moritati
    _________________________
    When all else fails, play dead
  • 2/23/2009 1:15 AM In reply to

    Re: getting the rectangle of drawn text

    if you have a SpriteFont called font.

    Vector2 size = font.MeasureString(text);

    Game hobbyist hell-bent on coding a diabolical Matrix
  • 2/23/2009 1:51 AM In reply to

    Re: getting the rectangle of drawn text

    cool, thank you for the quick reply :)
    Quando Omni Flunkus Moritati
    _________________________
    When all else fails, play dead
Page 1 of 1 (3 items) Previous Next