Hello Guest

Newbie lwjgl user.

  • 2 Replies
  • 7452 Views
Newbie lwjgl user.
« on: April 05, 2007, 04:10:07 »
Does anyone have any good strategies for drawing functional menu systems? I've really never tackled this sort of thing and am wondering if there are any tips and suggestions there are.

*

Offline bobjob

  • ****
  • 394
  • LWJGL: WOW SO GOOD
Re: Newbie lwjgl user.
« Reply #1 on: April 05, 2007, 11:13:34 »
ummm, do u mean only draw?

this is how i arrange my menu

good way to start, is just make a new button object which stores a location (x,y) and size (width, height). then draw it in orthographic mode(so its 2d). once u do that make an array of the button, and mayb an int value for its type.

then in the button object make a list of final static int values:
eg. int NEW_GAME = 0, OPTIONS = 1, QUIT = 2;

then in the object constructor button = new Button(int type, int locationX, int locationY);

then on a mouse event loop through buttons. if the x,y location of the mouse > x,y of the button and < width and height
then that button is triggered, then check the objects button type.

hope thats wot u were asking as its a bit detailed :)

Re: Newbie lwjgl user.
« Reply #2 on: April 05, 2007, 16:18:46 »
You basically outlined my mindset at the moment. Which fortunately means I'm on the right track.