Lemur links… (and more characters because forum requires it)

Creating the first new topic in the brand new Lemur forum group to post the link to the Lemur section of the contrib repo:
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/#svn%2Ftrunk%2FLemur--
Project now lives here: GitHub - jMonkeyEngine-Contributions/Lemur: Lemur is a jMonkeyEngine-based UI toolkit.

Edit: added a Getting Started page:

Getting Started

No way to cross text out but the below isn’t accurate anymore.
–Right now, Lemur still has to be checked out and built locally. When the JME build system is 100% back to normal, I will work on making Lemur a proper plug-in. Until then, I will soon commit some binaries that can be downloaded and used in your projects without having to build first. Though, at this stage, building from source is probably the best option.–

I’ve been slowly fleshing out the javadocs and hopefully we will have some better examples soon.

Edit: The SVN checkouts would be from:
http://jmonkeyplatform-contributions.googlecode.com/svn/trunk/Lemur/--
Project now lives here: GitHub - jMonkeyEngine-Contributions/Lemur: Lemur is a jMonkeyEngine-based UI toolkit.

Edit:

More links, latest release is here until I make a plugin:

Edit: releases can now be found here:

Latest release: Release Lemur version 1.5.2 · jMonkeyEngine-Contributions/Lemur · GitHub

From this post: http://hub.jmonkeyengine.org/forum/topic/lemur-jar-download/ …which has links to dependencies and stuff, too.

8 Likes

Updated the post to include links directly to the releases and javadocs.

I just uploaded a new version of these jars a few minutes ago, too.

1 Like

I just refreshed the jars and javadoc with the latest code.

I have an experimental grid and list box implementation in my own area that will (hopefully) make it into a release soon. They still need some rounding out. These will also be the basis for Tables and ComboBoxes.

Anyway, this release’s change log:
[java]
Lemur r1327

  • Updated Panel javadoc to clarify y-inversion in layouts.
  • Added a ConsumingMouseListener implementation that can be
    used to make GUI elements “opaque” to mouse events.
  • Added TextField.setFont().
  • TextComponent and TextEntryComponent will no longer recreate
    the BitmapText in setFont() unless the font has actually
    changed.
  • QuadBackgroundComponent modified to support Textures.
  • Added a HoverMouseListener to better facility fly-over style
    tool tips.
  • Added the ElementId to the toString() of the core GUI elements.
  • MouseAppState modified to do picking on the collision roots in
    reverse order so that they better act like layers.
  • Added convenience methods to ElementId to grab a child element
    ID using the dot-notation preferred by the style system.
  • Added standard get() method to Attributes that looks up the
    value without doing a default value check (which requires knowing
    the type).
  • Add the ability to retrieve the command lists from a button.
  • Added a double-gradient.png standard icon for creating ‘glass-like’
    vertical bevels.
  • Added a protected getDragStartLocation() to the default DragHandler
    implementation so that subclasses can retrieve it if needed. Useful
    for implementations that will indicate “rubber-banding” or similar.
  • Added a PickEventSession to handle delivery of cursor-based events
    to pickable components. Useful for non-mouse based event handling
    (ie: joysticks, touch, etc.) or when event locations need to be
    rempapped during event processing.
  • Changed MouseAppState to use a PickEventSession for its picking and
    event delivery.
  • Added Cursor-related events, listeners, and a CursorEventControl that
    works similarly to MouseEventControl but provides information about
    the collision.
  • Converted Slider and DragHandler to use the new cursor events so that
    they could better calculate projection.
  • Optimized QuadBackgroundComponent to avoid resizing the quad if its
    size hasn’t changed.
  • Added getChildren() and clearChildren() to GuiLayout and its
    implementations.
  • Fixed SpringGridLayout.remove() to recalculate the row and column
    counts.
  • Exposed button states isPressed() and isHighlightOn().
  • Added a method to SpringGridLayout to get the node at a specific
    row and column.
  • Modified SpringGridLayout to allow null children. This can be useful
    for padding out the edges for FillMode.FORCED_EVEN
  • Fixed SpringGridLayout to report the proper preferred size when
    FillMode.FORCED_EVEN is used for an axis.
  • Updated the javadoc for MouseAppState and PickEventSession
  • Added a TouchAppState for handling touch events similar to
    how mouse events are handled but supporting multi-touch.
  • GuiGlobals updated to automatically include touch support if
    detected. (Currently if touch is detected then the mouse
    support is disabled.)
  • Updated DragHandler to be a CursorEventListener instead of a
    MouseEventListener. This means it can avoid using the deprecated
    back door methods to getting ViewPort info since it is now part
    of the cursor event itself.
  • Fixed SpringGridLayout to do better clean-up if replacing an
    existing node at a specific row, column.
  • Added collection based addCommands() to CommandMap
  • Added a (style IDed) setter to Button for setting the whole
    command map.
  • Added some ElementId-based getSelector() methods to the Styles API.
  • Redid how the nested elements of a Slider are IDed. The class constants
    now refer to the nested part and not the whole ID. This means that
    if the user sets their own ElementId for the slider that the children
    will match.
    (Breaking change: for style code expecting the old element IDs.)
  • Added an aditional full-parameter constructor to Slider.
  • Fixed DefaultRangedValueModel to reclamp the value if the range changes.
  • QuadBackgroundComponent and TbtQuadBackgroundComponent manage their
    internal material better and now expose the GuiMaterial to callers.
  • Mouse button events now force a mouse move event just in case the button
    event comes sooner than the latest pick info.
  • Added a removeListenersFromSpatial() method to MouseEventControl (and
    CursorEventControl) that acts just like the addListenersToSpatial()
    in that it will ignore spatials without the MouseEventControl.
  • Perform null checks in addListenersToSpatial() and removeListenersFromSpatial().
    [/java]
5 Likes

Note: there’s a lot of detail in that, some of more or less relevance to the average user. The big take aways are:

  1. mouse event refactoring to allow reuse of the picking logic (say for offscreen rendering)
  2. proper touch event support that supports multidrag across components.

That last bit is kind of cool. If you have any regular Lemur-based mouse listeners, whether attached to existing controls or attached directly to normal JME models, then they now support multitouch, ie: you can drag more than one thing at a time while also hitting buttons and so on… up to the limit of the device.

Just pushed another release with some BREAKING CHANGES.

I hated to do it but it’s still early days and the inconsistency in the enum naming was really starting to embarrass me.

So, any FillMode, HAlignment, VAlignment, and InputState enum values will now need to be fixed in user code.

FillMode.EVEN becomes FillMode.Even
FillMode.PROPORTIONAL becomes FillMode.Proportional
VAlignment.CENTER becomes VAlignment.Center
and so on.

To anyone this affects, I apologize. I meant to fix these a long time ago and it’s been weighing me down ever since. Better to bite the bullet now, I guess.

Full change log:
[java]

  • TouchAppState fixed to avoid some minor per-update garbage
    creation.
  • Refactored how Styles are kept internally. This fixes some
    limitations that existed with parent/child selectors.
  • LayerComparator’s setLayer() utility methods were modified to
    treat layer 0 as null so the attribute gets removed.
  • Added layer number support to TextComponent and modified
    Label to give text components layers that will be less
    likely to conflict with backgrounds (also text with shadows).
  • Fixed a small event consumption bug in PickEventSession that
    only affected cases where MouseEventControl and CursorEventControl
    were used on a spatial together.
  • Fixed the camel-casing on the FillMode enum. This will break anyone
    using the old names but enums are hard to fix nicely and I feel
    it’s better to bite the bullet now.
  • Fixed the camel-casing on the HAlignment and VAlignment enums. This
    will break anyone using the old names, see above for reasoning.
  • Fixed the camel-casing on the InputState enum. This will break anyone
    using the old names, see above for reasoning.
    Sorry for the trouble.
    [/java]

The only other major change is that nested style references work better than the last version. Well, now they work like you’d expect… so I guess it’s a bug fix.

2 Likes

Another update… major improvement is a new ProgressBar GUI element.

Change log:
[java]

  • Slider now consumes the MouseMotionEvent if dragging is in progress. This
    fixes an issue with the spatial highlighting being turned off if the mouse
    or touch event slides off the spatial during dragging.
  • Moved FocusTarget and FocusManagerState to a separate ‘focus’ package.
  • Added isFocused() and isFocusable() to FocusTarget.
  • Modified FocusManagerState to be hierarchy aware when it comes to notifying
    changes in focus. This means that parent FocusTargets will also get
    notified.
  • Fixed DynamicInsetsComponent to overcome a previous limitation where it
    wouldn’t work if the containing GUI element already had its preferred
    size set.
  • Added a utility method findFocusTarget() to FocusManagerState. This is
    a refactoring of a previous protected method.
  • Added a ProgressBar GUI element.
    [/java]
2 Likes

Added a release now that the project has been moved to github… it’s been a long time waiting for a release since I made some changes that required JME 3.1. Now that the JME 3.1 alpha is out, I felt it was safe to make a break for it.

Edit: note: I still need to release the proto and example projects post-move.

3 Likes

LemurProto release:

LemurProps release:

Just published a Lemur 1.5.2 patch release.

Just some minor improvements:

  • Added @Documented annotation to StyleAttribute so that it shows up in the javadoc. (oops)
  • Fixed bug in Panel where insets were not applied during setInsets() if an InsetsComponent had been previously set (or insets were set a second time).
  • Fixed a bug with up/down event processing in Button. It was possible to receive up events when no down event was received. Now every down gets an up and there are no ups without downs.
  • Added an additional constructor to Container that takes a layout and elementId.
  • Added a simplified SpringGridLayout constructor that just takes the axes for axis ordering.
  • Modified DefaultMouseListener to have more configurable click detection. A click threshold can be specified on the constructor instead of being hard-coded to three. Also, the click detection is done with an easily overridable method.
  • Fixed IconComponent to allow setting the alpha value even if a color has not been set. Color defaults to white in that case.

I also updated the proto project to 1.4.2:

Again, just some minor improvements there too:

  • Added an additional constructor to OptionPanel to allow specification of the ElementId for the panel.
  • Fixed ListBox to properly set the alpha of the selector.
  • Fixed GridPanel to set the alpha of its children when they are added if the panel has an alpha configured.
  • Added some additional show() methods to OptionPanelState that allow the panel’s ElementId to be specified.

This is in prep for adding some major features. I wanted to get a baseline out before I did that.

As usual, if you find Lemur really useful and would like to buy me a doughnut or soda or something, I’m on Patreon: https://www.patreon.com/pspeed42?ty=h

4 Likes