Hello Guest

GUI Library

  • 4 Replies
  • 12449 Views
GUI Library
« on: April 05, 2012, 04:56:16 »
Hi,

I've looked at TWL and Nifty and FengGui and maybe I'm a bit slow or something, but they all seem a bit too complicated for me.  I want to basically be able to do this:

Code: [Select]
Gui gui = new Gui();

GuiButton button = new GuiButton();

button.setLabel("Click Me!");
button.setLocation(10, 10);
button.setSize(200,50);
button.setAction(someFunctionName);

gui.add(button);

And then in my game loop call something like:

Code: [Select]
gui.draw();
That's it.  I don't want to mess around with XML files or creating font bitmaps or a theme editor or any of that stuff.

Isn't there some basic LWJGL compatible GUI library that behaves this way?  I'm just finding it hard to believe that adding buttons and other basic controls to an LWJGL game should be so hard.

Or am I missing some super-easy way to use TWL (or whatever) that I can just pop in stock theme files that will make my controls look like Windows (or whatever) for now with the intention of maybe hiring a designer to develop a more customized look later?

*

Offline kappa

  • *****
  • 1319
Re: GUI Library
« Reply #1 on: April 05, 2012, 09:00:53 »
You could have a look at Gooei (a thinlet port).

Re: GUI Library
« Reply #2 on: May 26, 2012, 17:04:09 »
I am using Slicker for my 2D-games and there is a cool GUI implementation. :D Sure I had to change some things but it is very helpful ^^

Re: GUI Library
« Reply #3 on: May 30, 2012, 14:25:07 »
TWL ist not that hard, just the "Theme making"-part. Trust me, it basically like Swing. and your code kinda looks like TWL xD

Re: GUI Library
« Reply #4 on: June 07, 2012, 21:28:31 »
The hardest part about TWL is learning to make a theme. If you just want some simple, decent looking widgets, you might find the following pre-made theme helpful:
http://slick.javaunlimited.net/viewtopic.php?f=18&t=4859

Then use the Slick TWL examples to make a TWL state based game. :)