Lemur API / Documentation

Hi,

Just wondering if there’s any documentation on the Lemur code. Im curious as to what kinds of elements I can put into a container etc.

Good work btw, its very easy to grasp how it works by the demo you made.

Kind regards

@asser.fahrenholz said: Hi,

Just wondering if there’s any documentation on the Lemur code. Im curious as to what kinds of elements I can put into a container etc.

Good work btw, its very easy to grasp how it works by the demo you made.

Kind regards

Thanks. There is some minimal javadocs that upload when I push up a new jar:
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/Lemur/release/Lemur-javadoc.jar

I think all of the classes have at least class descriptions but that’s probably just about it. It’s something I need to work on.

Note: the Zay-ES full game example I wrote also uses Lemur for its UI:
http://hub.jmonkeyengine.org/forum/topic/zay-es-full-example/

The UI is minimal but maybe it makes a good companion to the other demo to show a slightly deeper use-case. The source for that is here:
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/zay-es#zay-es%2Fexamples%2FAsteroidPanic%2Fsrc%2Fpanic

And the specific files that use Lemur:
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/zay-es/examples/AsteroidPanic/src/panic/MainMenuState.java
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/zay-es/examples/AsteroidPanic/src/panic/PanicHudState.java
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/zay-es/examples/AsteroidPanic/src/panic/PanicStyles.java

… that’s based on memory, though. I think those are the only places.

2 Likes

I’ve been using both. And I can get very far with just that. I’m not stuck - just curious :slight_smile:

Just so I know i’m not missing something, i’ve gotta ask - are the currently supported controls: checkbox, slider, textfield and label? Or are there other controls - those are the ones I could gather from the type hierarchy in the api.

Yeah, I think those are the ones I’ve gotten to. I may create a list box soon. I kind of created the controls kind of as I needed them so far.

The theory behind Lemur was that you could use the separate parts to augment existing stuff or roll custom controls. The Panel, Label, etc. are kind of both useful “out of the box” controls as well as examples of how one might write their own… because unfortunately the component stack used by GuiControl is not something that I’ve documented very well yet.

Anyway, is there an element that you are greatly in need of at this point?

A listbox is the only one i’ve thought of could be useful for my game so far - it would cover a lot of functionality. Should allow the user to select 0, 1 or n elements.

Yeah, I have a back-of-napkin design for one, just haven’t done it.

I’m currently working on some issues with drag-and-drop style stuff… and I think that would be useful for lists, too.

Drag-and-drop could be usefull alot of places.

Looking forward to it :slight_smile:

I know that checkboxes that are mutually exlusive in the values would do this, but a radiobutton / combobox, to select one of multiple values would also help me out :slight_smile:

@asser.fahrenholz said: I know that checkboxes that are mutually exlusive in the values would do this, but a radiobutton / combobox, to select one of multiple values would also help me out :)

Hehehe… which do you want? A radio button or a combo box? :slight_smile: (I suspect “both”.)

Well, I think a combobox provides the cleanest ui-element of the two, so I’d take that one :slight_smile: No need for both.

Heheh… ok. These days my free time is taken up trying to write the sample networked game for Zay-ES.

In the mean time, I imagine it to be pretty simple to make a button that pops open another panel of buttons that when clicked just sends a value back and closes. Might be a stop gap solution while you wait for my schedule to be free. The benefit is that it will be easier for you to make behave exactly the way you want it.

I’m more excited about the networked Zay-ES game tbh and as I wrote earlier in this thread im not blocked by the missing Lemur-components, so there’s not rush on my behalf here. And my sparetime is very limited with regards to developing my game, so i’ll take all the contributions from the community I can get :slight_smile:

@asser.fahrenholz said: I'm more excited about the networked Zay-ES game tbh and as I wrote earlier in this thread im not blocked by the missing Lemur-components, so there's not rush on my behalf here. And my sparetime is very limited with regards to developing my game, so i'll take all the contributions from the community I can get :)

Heheh… it’s sort of taken on a life of its own. I started yesterday evening and I’m only just now getting to the actual game logic part. Going to make a single player ES-based game (with networking in mind) and then convert it to multiplayer as I add the remote support to Zay-ES.

Stay tuned…

3 Likes

Hi, did you ever get around to implementing a combobox element?

I’m looking at using a dropdown element, but I have no idea how to implement a class extending Panel

@asser.fahrenholz said: Hi, did you ever get around to implementing a combobox element?

I’m looking at using a dropdown element, but I have no idea how to implement a class extending Panel

No, sorry… but I’m closer. I at least have a list box class in my development area. :slight_smile:

If you are just interested in how to implement a simple one by extending Panel and just don’t know how to extend Panel, you can take a look at the Lemur-props extension project. In there is a PropertyPanel which does some more complicated things extended Panel. Though for your purposes, Slider may be a decent enough example.

How I’d do it without a list box is to extend panel, give it a border layout with a label in the center and a button in the ‘east’. To the button I’d attach an action to pop open another panel with a list of buttons in it. Easy enough to describe it, of course. :wink:

Edit: you could even just make the combo box extend button directly and forgo the separate label and button sub-parts. Just let clicking anywhere on the combo open the options. All of the above presume you don’t want custom values typed into the field and that your options are small enough not to require scrolling. Otherwise things are more complicated.