Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Okay so I want to create a main menu which includes several buttons and text fields, is there a built in library for LWJGL or would I use normal Swing and start a thread of the application?

Its a 2D game and I'm simply looking for a way of starting it from a menu rather than having it jump straight into game.

share|improve this question
    
possible duplicate of Making a HUD/GUI with OpenGL (LWJGL) –  Byte56 Aug 8 '12 at 0:41
add comment

1 Answer 1

up vote 2 down vote accepted

As far as I know, there isn't a built in library for LWJGL, but there are several libraries using LWJGL.

I tried NiftyGui and TWL. TWL looks a bit easier and less messy to me, but both libraries need quiet a lot of time to get used to work with (i managed to make some simple UIs with NiftyGui, with TWL we are stuck in the theme creation...).

If you only need buttons, you can make something pretty quick by yourself. But input text boxes (where the player can enter text) require some more work.

My advice would be: Check what you want to do. Do you want a complex or a simple UI. Does it need many different controls (sliders, checkboxes, comboboxes, textfield, multiline textfield, dropdown etc.) or only a few. If you have a complex UI with many menus, settings, editable controls etc. I would look at either TWL or NiftyGui, as both libraries are used by many people and work pretty well (if you set them up correctly). If you only need some basic things like buttons and a text menu, I would implement a basic UI by yourself, as it could take more time getting used to something like TWL or NiftyGui, then implementing the basic things from scratch.

As Peter Taylor pointed out, feng gui could also be an alternative. Though it seems to be discontinued, it seems to have a solid base: http://www.fenggui.org

share|improve this answer
    
FengGUI is another option, although it's a couple of years since I used it so I don't know what state it's currently in. –  Peter Taylor Aug 11 '12 at 8:15
    
Oh yeah, I also read about feng gui, but never tried it, as it seems to be discontinued (last update on page is from 2009). There is a list of alternatives on the feng gui page. I add it to my answer. –  tom van green Aug 13 '12 at 8:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.