Newbie lwjgl user.

Started by Ziploc, April 05, 2007, 04:10:07

Previous topic - Next topic


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.


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 :)


You basically outlined my mindset at the moment. Which fortunately means I'm on the right track.