GUI help

Started by
5 comments, last by Ovicior 9 years, 2 months ago

Hi i would like to know if somebody could help me with my GUI. I would like to know how to program buttons a GUI and how to make interactive buttons. I need to know how to do it in Monogame. I have tried to use content unload and somewhat making the buttons.

Advertisement

Specify what framework you're using: In this case, Monogame. Also tell what you've already tried. This post won't help you because it does not have enough information.

What will you make?

Specify what framework you're using: In this case, Monogame. Also tell what you've already tried. This post won't help you because it does not have enough information.

i will rewrite it ty.

Specify what framework you're using: In this case, Monogame. Also tell what you've already tried. This post won't help you because it does not have enough information.

i will rewrite it ty.

Still needs more. What've you tried?

What will you make?
Rendering: Draw a textured rectangle and some text if the button needs text.
Input handling: Detect when the mouse is within the rectangle. Have the renderer change the rectangle's color in this situation.
Input handling: If the mouse is clicked (up->down->up) while still inside the button, treat it as a button press.

Rendering: Draw a textured rectangle and some text if the button needs text.
Input handling: Detect when the mouse is within the rectangle. Have the renderer change the rectangle's color in this situation.
Input handling: If the mouse is clicked (up->down->up) while still inside the button, treat it as a button press.

Can you tell me more indepth?

Rendering: Draw a textured rectangle and some text if the button needs text.
Input handling: Detect when the mouse is within the rectangle. Have the renderer change the rectangle's color in this situation.
Input handling: If the mouse is clicked (up->down->up) while still inside the button, treat it as a button press.

Can you tell me more indepth?

Try this: http://stackoverflow.com/questions/9712932/2d-xna-game-mouse-clicking

If you want more detailed replies, register on the website and go the programming section and post there.

EDIT:

apparently XNA includes a mouse class.Try and use that.

What will you make?

This topic is closed to new replies.

Advertisement