GUI Library

Started by TimmerCA, April 05, 2012, 04:56:16

Previous topic - Next topic

TimmerCA

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:

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:

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?

kappa

You could have a look at Gooei (a thinlet port).

TKPROG

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 ^^

R.D.

TWL ist not that hard, just the "Theme making"-part. Trust me, it basically like Swing. and your code kinda looks like TWL xD

mattdesl

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