Game UI

We could use Java Swing for the UI parts other than the 3D view. Most pure OpenGL based GUI:s are fairly primitive, although they may look a bit better or work faster. But JME supports rendering and interacting with Swing UI:s on textures, and swing UI:s can be skinned, so it could be an acceptable solution.

The potential problem with this approach could be performance issues (first swing stretching a lot of textures in 2D, and then JME sending the swing UI to a texture each frame). To check out if it is a feasible approach we could do a short spike to test it.

JMEDesktop
The JMEDesktop is a class in JME that allows running a Swing UI and rendering it to a plane (and getting mouse clicks and other input from the 3D view to Swing).


 * Initial forum thread (from 2005)
 * A small screenshot

StandardGame
There is a little documented game base class called StandardGame in JME, which has some advantages over BasicGame. See the StandardGame tutorial.

Synth Look and Feel
The Synth look and feel seems to allow using completely custom graphics for buttons and other swing components, so we could use it to create a more game-like skin.

Some web pages about Synth:
 * http://synth.l2fprod.com/
 * http://www.javadesktop.org/articles/synth/index.html
 * http://www.ibm.com/developerworks/java/library/j-synth/

Frames
These UI widgets/parts need an image with borders, to use as background:


 * Button
 * Normal state
 * Mouseover state
 * Default button state (for OK buttons in dialogs and such that are activated with an enter press also)
 * Default button mouseover state
 * Pressed state
 * Input area - Text field, combo box, other textual input
 * Design area - background for blueprints and other kind of editable documents / designs.
 * Resource area - for inventories, libraries, friends lists, tables - usually non editable, list like content.
 * Panel - Area containing other UI widgets

Frames could be generated as procedural textures too, optionally. They would be generated once and then cached. The inputs to each pixel would be:
 * wholeAreaX 0..1 - interpolated over the whole image area, including the borders.
 * wholeAreaY 0..1
 * centerAreaX 0..1 - interpolated over the center area, inside the borders. Clamped to 0 or 1 when in the border area.
 * centerAreaY 0..1
 * topEdge 0..1 - the edge parameters would be 0 next to the center area, and 1 at the outer edge of the image
 * leftEdge 0..1
 * rightEdge 0..1
 * bottomEdge 0..1

Icons
We'll need these icons:
 * Check box
 * Checked
 * Unchecked
 * Radio button
 * Selected
 * Unselected
 * Window manipulation
 * Close button
 * Maximize button
 * Minimize button
 * Restore button
 * Options button

All of the icons need these states:
 * Normal
 * Mouseover
 * Pressed
 * Disabled