Lemur version 1.5.1 with JME SDK 3.1 compatibility
Finally! Another Lemur release. This release includes a ton of changes that have been waiting for JME 3.1 to be in released state. (This is my first github release, so be gentle.)
Now that the project has been moved to github, it's a good time to get new binaries up and start a new versioning scheme. Given that there were only 4 official releases prior to this, I've seeding the minor version with 5.
Note: if you find this project useful to you in they "Hey, I'd like to buy that guy lunch sometime" kind of way... consider becoming a patron: https://www.patreon.com/pspeed42
Current required dependencies:
- guava (newer than 12)
- slf4j-api-1.7.5 (and a logging adapter)
- jme core 3.1
- optionally: groovy-all.jar 2.1.9 or later if you want style file support
The changes in this release, in no particular order:
- Fixed an error message in SpringGridLayout to refer to itself properly.
- Modified GuiGlobals to have a protected getAssetManager() field.
- Fixed a bug in PickEventSession when using non-Viewport root pick roots.
- Added setters/getters for MouseAppState's includeDefaultNodes field that
controls if pick roots are automatically added during initialize. - Fixed Slider to not add the drag handler to the slider range. It was a
leftover from when drag events weren't delivered to the capture properly
and now left the strange behavior of dragging in the slider range causing
the button to move. - Added Axis.getDirection() to return one of the constant Vector3f.UNIT_X,
UNIT_Y, or UNIT_Z depending on the axis value. - Added Slider.getValueForLocation() which can be used to calculate where
in the model's range a particular local coordinate represents. Useful
for a variety of range-related listener behavior. - Updated GuiControl.setPreferredSize() to throw an illegal argument exception
if the specified size is negative. - Fixed GuiControl.setSize() to not mutate the passed in size.
- GuiControl.setSize() passes the original size to GuiControl listeners instead
of the child-mutated size. - Fixed a small sizing issue in BorderLayout where it was always passing
through 0 for the z size when setting the size of children. Now it passes
through the size that was passed to reshape. - Added Button.removeClickCommands()
- Added Container.clearChildren()
- Modified PickEventSession to keep its pick roots in a SafeArrayList for
garbage-free iteration. - Added setAlpha()/getAlpha() to ColoredComponent and modified all ColoredComponent
implementors to have the new methods. - Added Panel.setAlpha() and Panel.getAlpha() for setting the alpha of just
the panel and it's components or of all children recursively. Useful
for fading in/out entire UI hierarchies. - Fixed a bug in DefaultRangedValueModel where changes to min and max value weren't
incrementing the version. - Added some more trace level logging to the Styles class to help users debug
style issues. - Added styling attributes for Panel.alpha and Panel.preferredSize
- Added vec3() and vec2() functions to the style API
- Fixed GuiControl to clamp the passed size to min 0,0,0 during reshape.
- Added a check for negative sizes to GuiControl.setSize().
- Refactored how named layer ordering is done in GuiControl by creating a separte
ComponentStack class that can enforce a total ordering based on named layers.
Soooo much simpler. All of the other GUI elements were modified to use it.
The breaking change is for any custom GUI element that relied on the old weird
component ordering methods as they are now gone. - Added setIcon() to label to set an icon-layer component. (This was made easy
by the above refactoring and is long overdue.) - Breaking fix: modified how TextComponent's z offset is used to be more sensible
and to properly affect the next layer in the stack. This directly affects
shadowOffset and any styling using shadowOffset probably needs the sign of
its z component flipped. The new default shadow offset is now (1, -1, -1) - Added FocusChangeListener and FocusChangeEvent support. GuiControl now has
add/removeFocusChangeListener() methods for registering listeners that will
be notified when the control loses or gains focus. - Fixed a bug in SpringGridLayout where a minorFill wasn't getting handled
right if major file was set to ForcedEven and minorFill was not. - Fixed a bug in CursorEvent deliver if the captured spatial was removed before
the up event was received. The attempt to deliver move events was throwing
NPEs. Now it just returns the current event consumption state instead. - Panel now has a "border" property in addition to "background", so all
regular GUI elements can now have separate borders and backgrounds. - GuiControl can now be "focusable" even if none of it's child components are
by using the setFocusable() method. - Added a Slider constructor that takes Axis, ElementId, and style.
- Gave TbtQuadBackgroundComponent a proper toString() method.
- Gave SpringGridLayout a proper toString() method.
- Added some style-less constructors for Label and Container.
- Modified IconComponent and QuadBackgroundComponent to set AlphaDiscardThreshold
instead of just alphaTest since alphaTest is a no-op in JME 3.1. (Note: this
is a breaking change for 3.0 because it's Unshaded.j3md doesn't have an
AlphaDiscardThreshold.) - Styles.DEFAULT_STYLE changed to Styles.ROOT_STYLE to better reflect what it's
for... also the constant was changed from "default" to "root". - Styles now supports a user-defined default style that will be used for style
application when no other style is defined. Useful for globally setting
a UI's look and feel. - Modified some Styles trace logging to include more info.
- GuiGlobals font loading modified to set AlphaDiscardThreshold in addition to
alphaTest since alphaTest is a no-op in JME 3.1. (Note: this
is a breaking change for 3.0 because it's Unshaded.j3md doesn't have an
AlphaDiscardThreshold.) - Added a TextField constructor that takes just text and element ID.
- Fixed a syntax error in StyleApi.groovy's vec2() helper function.