Simple GUI for jme

Are there any simple performant GUI for jme3?

I saw lemur and it looks okay, the wiki is pretty good. I saw Nifty-GUI but it seems it’s abandoned or a bit slow on the rendering.

Are there other gui toolkits for jme? Is there any one that most people use?

Simply said no.

There are a few more, but non is clearly better in every aspect.

can you link to those few more?

can you list those few more?

Hi
Have a look at these pages

http://wiki.jmonkeyengine.org/doku.php/jme3:contributions:tonegodgui

http://jmonkeyengine.org/208430/the-herodex-gui-working-in-jme3/

Heheh… quote from that last link regarding Lemur:
“It shows much lower activity levels than either TonegodGUI or Nifty”

…yes, well, it’s hard to say. I definitely see much fewer questions on the forum. But I know for a fact I have many users who use it and never ask questions… so it’s hard to say. (Heheh… reading further in the Herodex document… they used Lemur also and never asked any questions. :))

I think at this point you will find few GUI libraries that are better supported here than Lemur. It’s only downside is that it doesn’t have as many components as some of the other libraries.

To be fair, someone also has a Java-FX wrapper they’ve put together. You can search the forum for it but I don’t keep a link to that handy since it won’t work for my UIs.

1 Like

If you are really only looking for a simple GUI in support of a small prototype or something, TGG is perfect. It’s the easiest.

If you are aiming for a big project, I would make a small test using each library, because changing the used GUI library later on is a nightmare.

Easier than Lemur? That’s very debatable.

These days, TGG is virtually unsupported, though.

The one thing it definitely has over Lemur is more GUI element types. But then you aren’t making a simple GUI anymore.

Small correction: I do not in anyway think TGG is perfect… only perfect in the context of my sentence.

I think TGG is way easier than Lemur to get started and do simple stuff. One day you’ll realize that the world of java and patterns black-belts is actually quite a small world :smiley: . Lots of us (me included) never even had much computer lessons.
I am a fan of Lemur… everything of it is just beautiful, but with TGG, you copy paste 2 lines and from there you kinda just add controls. I can tell you this though, a couple more controls in Lemur and, at this stage of my project, I’d be miserable not using it :D.

I agree with you that Lemur has the best support anybody could dream of.

Isn’t that what you do in Lemur also?

One line of code to initialize lemur. (I guess in TGG you have to create a screen? Not sure what else.)

One line to load a default style if you want.

Then create a GUI:

Container window = new Container();
Button b1 = window.addChild(new Button("Button 1"));
Button b2 = window.addChild(new Button("Button 2"));

guiNode.attachChild(window);

window.setLocalTranslation(400, 400, 0);

I guess it’s a style preference, maybe. The whole “extend an element to hook into events” thing in TGG rubs me 100 wrong ways so maybe I can’t see the ‘ease of use’.

I’ve read some of the Lemur doc (and checked some of the code), and from what I got, the amount of info you need to put everything in order to work is higher… but it’s also better in plenty ways. But it’s not easier in any way as a jump-in. Now if we talking big project, then easiest might be Lemur. But check 10 lines of doc, paste 2 then check the controls list, choose one and go from there, TGG is unbeatable.

“extend an element to hook into events”: yah, I didn’t like that either, but just extended them once and they now accept a listener parameter (yah should be a list as you told me ages ago). Boom done.

I’m just curious what this is. I’d like to improve it if I can.

…which is the part that feels like “lots of extra info to make it work”?

I might have to retract my affirmation here :smiley: .

Lemur has less (none?) stuff linked that is required for very basic stuff than I thought. I thought inputMapper and so on were required for example, and I was wrong.

I have some very minor stuff (one lib versus 2 libs + sl4j + adapter, guava; touch not supported out of the box) but that’s really just trying to be right.

Couple questions:

  • does the textField come out of the box with support for click-text select, paste, home, end, shift, double/triple click and so on?

No, not yet. It makes me sad. :chimpanzee_sad:

HAHA!!! I win!

Blah, no, I was wrong :.

Lemur supports touch out of the box. Not sure what that means. In fact, all GUI elements are multi-touch enabled so you can drag two sliders at once with separate fingers and so on. It’s very elegant how that is handle and even your own regular Spatials can tap into that same code. (In fact, the guy who did a lot of work on the JME Android support uses Lemur and helped me get all of that right.)

All Java apps should include guava, really. And JUL logging is just horrible… I cannot in good conscience use it on my own projects. :smile: So I compromise and use slf4j which can delegate to JUL for those who prefer it.

I’ve been working on a GUI that works on top of the JME platform. For now I suggest using the picture object and text image strings to build a GUI.

…which you can also do with Lemur and get picking for free.

Edit: and by “also do with Lemur” I mean that literally… you are free to continue using Picture and BitmapText if you want to for some reason… and get picking of those essentially for free.

Sorry, thought you had clicking by default but touch required the touch app state. Nice.

Nice, my android virtual joystick(s) (doesn’t use a gui lib) supports multi-touch… I won’t show the code though, because it was coded with a foot or something.

interesting.

Thanks for all the feedback, I know GUI can be a pain to do, I’ll have to just really take some time to test and learn these implementations to see which one works for me. At least now they are all listed with pros and cons from the community.

Thanks