Programming => General Java Game Development => Topic started by: TimmerCA on April 05, 2012, 04:56:16

Title: GUI Library
Post by: TimmerCA on April 05, 2012, 04:56:16

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


And then in my game loop call something like:

Code: [Select]
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?
Title: Re: GUI Library
Post by: kappa on April 05, 2012, 09:00:53
You could have a look at Gooei  (http://code.google.com/p/gooei/)(a thinlet port).
Title: Re: GUI Library
Post by: TKPROG 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 ^^
Title: Re: GUI Library
Post by: R.D. 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
Title: Re: GUI Library
Post by: mattdesl 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:

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