Drawing action text inside rectangle

  • #1, by ygmantellMonday, 31. August 2015, 15:12 9 years ago
    When I am doing this, how do I know the coordinates of the rectangle. Is there a reason it isn't just a "select an object area" type of thing?

    Great Poster

    274 Posts


  • #2, by sebastianMonday, 31. August 2015, 16:00 9 years ago
    you mean the properties inside the game settings, right? you have to set the coordinates related to your game resolution

    Thread Captain

    2346 Posts

  • #3, by ygmantellMonday, 31. August 2015, 16:02 9 years ago
    I understand that. But how do I know what the coordinates are of the rectangular area that I want to put it in.
    Thanks

    Great Poster

    274 Posts

  • #4, by sebastianMonday, 31. August 2015, 18:13 9 years ago
    you can use a scene which is as big as the game resolution and point with the mouse on a point The coordinates of that point are displayed in the upper right if the window

    Thread Captain

    2346 Posts

  • #5, by sebastianMonday, 31. August 2015, 18:14 9 years ago
    you can use a scene which is as big as the game resolution and point with the mouse on a point inside the scene. The coordinates are displayed in the upper right of the window

    Thread Captain

    2346 Posts

  • #6, by ygmantellMonday, 31. August 2015, 18:17 9 years ago
    And then I take 4 points of a rectangle and use those?

    Great Poster

    274 Posts

  • #7, by afrlmeMonday, 31. August 2015, 21:44 9 years ago
    The position of the rectangle / square is based on the top left pixel of said rect & then the width & height. Like so: x, y, width, height. You have to take into account that the position is based on the top left pixel so to center the box to a specific coordinate you would need to remove half the width value from the x position & same again with the height.

    Quick note: the position is based on the viewport (camera) & not the scene width / height.

    Imperator

    7285 Posts

  • #8, by sebastianTuesday, 01. September 2015, 08:14 9 years ago
    also the text inside this rectangle is centered.

    Thread Captain

    2346 Posts