Nifty GUI Changelog

New in version 1.4.1

January 26th, 2015
  • Nifty 1.4.1 Changes ===================
  • feat: add support for directly supplying a ResourceBundle again
  • Additionally to the existing method another addResourceBundle() method has been added that takes a ResourceBundle instance.
  • Please note a few things:
  • You can't mix using the regular baseName based method and the ResourceBundle based method for the same id. The last call will win when using the same id. You can and probably should call the new addResourceBundle() method with different instances of ResourceBundle that have been initialised with the Locales you want to support. It's okay to only use a single one too but in that case you can't switch the locale with nifty.setLocale() of course. The first call to the new addResourceBundle() method will be used when nifty.setLocale() is called with null the default locale basically.
  • fix: add missing jorbis dependency to nifty-examples-sick2d pom.xml
  • fix: CheckBox control did not keep it's state when being hidden/shown
  • The custom Nifty effects for the CheckBox (scale + fade) have been removed for now. The new way of keeping the visible state of child elements intact when a parent element is hidden introduced issues with the custom effects.
  • fix: element.show() needs to trigger onShow events for visible elements
  • The commit 77059d2544d3825aaa680491683b377aa1b1fb41 introduces an issue with the controls example. All the main panels (and the hints too) didn't fade in properly because of the commit mentioned above.
  • The show() method has now been changed back to the original code that will use startEffect() instead of startEffectWithoutChildren(). Doing that means we'll again iterate through all child elements.
  • But this time we'll not start the onShow effect for elements that are invisible. So we fix the original problem where it was possible that invisible child elements with an active onShow effect prevented an actual show() call and still keep the remaining functionaility intact which fixes the controls example.
  • fix: Really fix hint effect completely this time
  • We still have to initially hide the hint. This was missing from the last commit which lead to the possibility that a hint was initially been displayed. This occured in the controls example demo where the hint was suddenly displayed in the top left corner when you hovered over the menu buttons on the top.
  • Now we initially hide the hintLayer.
  • Fixed JoglMouseCursor loading cursor texture upside-down
  • Added static 'flipArray' utility method to JoglMouseCursor (consider moving elsewhere? i.e. a utility class) -JoglMouseCursor init uses 'flipArray' to reverse BufferedImage pixel data so that it is properly compatible with OpenGL texture coordinates.
  • Merge pull request #295 from bgroenks96/1.4
  • Implementation of JoglMouseCursor; Fix for chat control not displaying text properly (issue 293)
  • Fixed JoglMouseCursor throwing ArrayIndexOutOfBoundsException on init
  • -JoglMouseCursor initializer now uses BufferedImage.getRGB instead of getRaster().getData()
  • Fixed chat control not displaying text in player/chat list boxes
  • -> TextRenderer.setText/setLabel were placed before setStyle in ChatBoxViewConverter; this caused setStyle to overwrite the submitted text because it calls setStyle(). Both method calls were moved after setStyle. This *seemsto have resolved the issue.
  • Fixes #293
  • Merge pull request #288 from relu91/1.4
  • Automatic style reloading
  • Implemented JoglMouseCursor; added Window parameter to JoglRenderDevice constructor
  • -JoglMouseCursor no longer uses AWT references and should (hopefully) be working properly -JoglRenderDevice now requires a com.jogamp.newt.Window parameter in the constructor (old constructors are deprecated with warnings). -JoglMouseCursorFactory now requires a com.jogamp.newt.Window parameter in order to create JoglMouseCursor -JoglBatchRenderBackendFactory/JoglBatchRenderBackendCoreProfileFactory now require a com.jogamp.newt.Window parameter in their 'create' methods in order to initialize JoglMouseCursorFactory
  • Added ability to reload a control style file and notify the elements with that style. it also adds the ability to update a registered StyleType
  • element.show() not propagates EffectEventId.onShow to children anymore
  • When you show() an element in the past the EffectEventId.onShow was triggered for all children, even for invisible ones. So we'd end up with invisible child elements with an active onShow effect which would prevent an actual show() call on that child elements.
  • This commit will now not propagate EffectEventId.onShow to the children anymore.
  • fix hint effect, closes #246
  • Merge pull request #281 from relu91/1.4
  • Fix code style for my previous pull request
  • Update Listbox
  • Fix code style
  • Merge pull request #280 from relu91/1.4
  • Added methods to listbox to retrive Scrollbars.
  • Added methods to listbox to retrive Scrollbars and buttonStepSize / pageStepSize.
  • [Button] MoveCursorDown and MoveCursorUp don't check parent anymore
  • NextInputElement and PrevInputElement didn't check the parent of the elements they change focus to/from. There is no known reason why it should not be the same for MoveCursorDown and MoveCursorUp.
  • Merge pull request #279 from 3xp0n3nt/refactor-nifty-examples
  • Refactor Nifty Examples.
  • Merge pull request #278 from 3xp0n3nt/rename-jogl2-to-jogl
  • Rename jogl2 to jogl.
  • Merge pull request #275 from 3xp0n3nt/refactor-mouse-element-interaction
  • Refactor element mouse interaction.
  • Merge pull request #273 from 3xp0n3nt/get-panel-background-color
  • Add method to get panel background color.
  • Refactor Nifty Examples.
  • Move all LWJGL content in nifty-examples module to it's own new module, nifty-examples-lwjgl. LWJGL isn't special it can have its own examples module just like everyone else.
  • Remove nifty-renderer-lwjgl dependency from nifty-examples.
  • Refactor LWJGL initialization code in nifty-examples-lwjgl to make it stupid-easy to load & run any NiftyExample in one line of code (hint: it's easier than Slick2D, and that's difficult to beat)
  • nifty-examples-lwjgl now implements every single example found in nifty-examples
  • Cleanup & refactor the code in many of the examples in nifty-examples. TODO: Many more examples still need a ton of cleanup though!
  • Delete the "issues" package & classes out of nifty-examples:
  • This has got to be the most horrible idea I've seen in Nifty in a long time. It reeks of laziness. First of all, there's the problem of unsustainability. What's going to happen as the number of these issues keeps growing? At some point it's going to get nasty. It increases the size of the Nifty Gui library as well.
  • Secondly, all those issues have been resolved! Who wants to see a bunch of code demonstrating non-existent problems? Probably no one.
  • Who's going to want to maintain & update code for non-existent issues in the future when the examples or other code needs refactoring? *Cricket, cricketThat's what I thought. I've refactored the Nifty examples, and in the process, I've broken these stupid issues classes. Guess how much motivation I have to fix them?
  • If you want to create demonstrations of bugs, please maintain your own repository for such things. In fact, why not have a public nifty-issues repository for this? There, problem solved.
  • Delete the top-secret, uber-special "meins" file. It's from 2008, and it looks like @void256's personal notes or something? Doesn't belong in Nifty Gui.
  • Add some missing examples to nifty-examples-slick2d (tutorial, multiclick, healthimage), since it's insanely easy to add new examples (thanks to @mkaring).
  • Unrelated: Fix Slick2D naming inconsistencies. Some modules / packages / comments / etc use the word "slick", some use the word "slick2d", and still others use the word "slick2D". Rename comments & text mentions Slick2D, for package names & module names that require lowercase, use slick2d everywhere.
  • Note: Slick2D still has some pre-existing unresolved issues, such as certain examples crashing due to "java.lang.NoClassDefFoundError: com/jcraft/jorbis/Info" (music issue?).
  • Unit tests & integration tests are successful (excluding all the pre-existing examples issues what I mean is that the changes did not introduce any bugs / regressions as far as could be tested).
  • Rename jogl2 to jogl.
  • Rename nifty-renderer-jogl2 to nifty-renderer-jogl. Rename the actual module directory and its reference in the main parent pom.
  • Why have version numbers in the module name? It makes no sense. Not only would it be tedious to maintain as the version changed, but it's inconsistent with all the other rendering modules. The whole point of each module having it's own pom file is to specify the current version in there.
  • Refactor element mouse interaction.
  • There is an ambiguously-named method in the Element class that spurred on this refactoring: onClick.
  • Surely this method began long, long ago with good intentions...
  • But now that Nifty has separated the idea of a click from a release, now that there exists multiclicks, primary clicks, secondary clicks, tertiary clicks, and combinations of clicking and releasing, this method is embarrassingly outdated.
  • What it actually does is simulate a click-release of the primary mouse button. "Simulate" means that normally all mouse actions are handled via events, but in this case, the event system is bypassed and the mouse action is handled AS IF it received an event.
  • This simulation is useful when we want to cause mouse actions to occur that are not originated by the user. The only actual INTERNAL use case for this currently is handling NiftyStandardInputEvent.Activate events.
  • Not only is the Element.onClick method name ambiguous, but the method it delegates to is also ambiguous; that is, ElementInteraction.activate, and the method that that method delegates to is also ambiguous: ElementInteractionClickHandler.activate, and finally this last method also delegates to another ambiguously named method, MouseClickMethods.activate.
  • Why are they ambiguous? Because these "activate" methods are really simulating a primary mouse button click-release. This "activate" concept is a bad abstraction because in all these classes it is surrounded by other methods that very specifically refer to mouse related parts and actions (wheels, buttons, clicks, etc).
  • It's very important to have a consistent level of abstraction here. So the solution is to rename all these "activate" methods to what they are so that they harmonize with the other methods there, which means using the phrase "clickAndReleasePrimaryMouseButton" or similar wording as appropriate.
  • This renaming revealed that there were some methods missing for supporting simulating secondary and tertiary mouse button click-releases, so add those methods as well (most of the framework was already in place for secondary & tertiary mouse actions).
  • Now we have elegantly solved the ambiguity of Element.onClick while simultaneously adding some interesting features:
  • Element.onClickAndReleasePrimaryMouseButton Element.onClickAndReleaseSecondaryMouseButton Element.onClickAndReleaseTertiaryMouseButton
  • Now we can directly cause a click-release for either of the three mouse buttons supported by Nifty, without having to dig through the code to interpret the meaning of bad abstractions (Element class already contains much explicit mouse-related functionality, so the above three methods are not out of place).
  • Because the Element.onClick method is public, deprecate it rather than deleting it (in line with other past refactorings of public Element class methods). Refer users via the onClick javadoc to onClickAndReleasePrimaryMouseButton.
  • Make Element.onClick delegate to Element.onClickAndReleasePrimaryMouseButton.
  • Add extensive javadoc to Element.onClickAndReleasePrimaryMouseButton, Element.onClickAndReleaseSecondaryMouseButton, & Element.onClickAndReleaseTertiaryMouseButton to explain what they do and in what situations they won't work. (This information was missing on the Element.onClick method, making it even worse).
  • Change all internal callers of Element.onClick to use Element.onClickAndReleasePrimaryMouseButton. Now, Element.onClick has no uses internally and is ready to be deleted after the next release of the library.
  • Element.onClickAndReleasePrimaryMouseButton is used internally to handle NiftyStandardInputEvent.Activate events. The name of the new method is self-documenting and should eliminate confusion for users implementing custom controls and/or custom input mapping. They also now have the option of mapping to secondary and/or tertiary mouse button click-releases.
  • When Element.clickAndReleasePrimaryMouseButton is called, now not only will a NiftyMousePrimaryClickedEvent be generated as before, but ALSO a NiftyMousePrimaryReleaseEvent. The same applies for secondary & tertiary mouse button click-releases. This was actually a preexisting bug that has been fixed.
  • Other changes:
  • Remove all other methods from the Element class that were deprecated in the previous version of Nifty. It should be safe to remove them now that they are deprecated in the current release version of Nifty. None of these methods were in use internally.
  • The multiclick mouse code was poorly written, not conforming to the library's code style, contained spelling errors and poorly written comments. This has been improved although it is still far from complete. The logic of the multiclick code has not been changed.
  • All unit tests are passing, and integration testing was successful.
  • Add method to get panel background color.
  • Merge pull request #266 from 3xp0n3nt/gdx-input-multiplexer
  • Add LibGDX input forwarding customization.
  • Add LibGDX input forwarding customization.
  • Make it possible to forward input events unhandled by Nifty to multiple custom LibGDX InputProcessor's. Currently, the GdxInputSystem used by Nifty consumes all input. On the other hand, if you try and capture input via LibGDX directly, for example to get input directly for your game that is being rendered underneath the Nifty UI, then Nifty will not receive any input.
  • The problem with the current setup is that it's an either-or approach, so either 1) Nifty (the UI) will consume all input, or 2) some custom InputProcessor set by the LibGDX method Gdx.input.setInputProcessor (myCustomGameInputProcessor) will consume all input (the game).
  • What is needed is for Nifty to share nicely with others. ;-) So modify GdxInputSystem to use LibGDX's InputMultiplexer, which supports multiple InputProcessors simultaneously. Modify the GdxInputSystem constructor to allow the optional addition of multiple custom InputProcessors. Add methods to GdxInputSystem to append, insert, remove, clear, and get custom InputProcessors.
  • The new way GdxInputSystem will work by default is that Nifty will get first dibs on any input. If Nifty does not process the input, then any custom InputProcessor's that are set will receive the input, in the same order they were added / inserted.
  • However, there is now the possibility of specifying that Nifty will receive input AFTER all of your custom input processors. (This is not the default behavior as most use cases will have Nifty as a UI overlaying a game, so it makes sense to allow the UI a chance to handle the input before the game.) Add an additional constructor to GdxInputSystem that allows passing in the enum NiftyReceivesInput.FIRST / NiftyReceivesInput.LAST. FIRST is default, if LAST is specified then any custom input processors will receive first dibs on any input, and only if it is not handled, that is the input handling method in the InputProcessor returns false, then Nifty will receive it.
  • Merge pull request #265 from mkaring/1.4
  • Catching a possible NPE on linux systems
  • Catching a possible NPE on linux systems that are caused by a bug in the java runtime.
  • For further information: JDK-6322854
  • Merge pull request #260 from 3xp0n3nt/slick-batch-renderer
  • Implement Slick2D batched rendering.
  • Implement Slick2D batched rendering.
  • Slick is old and dying. My research shows that there is only one person that has even attempted to maintain it in the last year or so (kudos to nguillamin at https://bitbucket.org/nguillaumin/slick and https://github.com/nguillaumin/ who maintains his own fork of the main slick repo at bitbucket).
  • Similar to Nifty, Slick has it's own rendering systems and OpenGL abstraction. So they are not compatible with each other. Both Nifty and Slick cannot control UI rendering simultaneously.
  • So the current workaround to make Slick work with Nifty has been to provide SlickRenderDevice, a direct implementation of RenderDevice, that ultimately delegates all control to the Slick internal rendering system. So Slick is basically given full control of UI rendering.
  • The problem with this approach is that it effectively bypasses the entire new batch rendering system built in to Nifty (where Nifty has full control of UI rendering the exact opposite of the above situation).
  • For the above reasons, every direct implementation of RenderDevice in the entire Nifty Gui library is marked as deprecated (and soon to be removed). These implementations are also horribly outdated (using ancient immediate mode OpenGL) and are preventing Nifty from moving forward more quickly to stay relevant as a modern OpenGL-based UI rendering system.
  • The new Nifty batch rendering system has consolidated rendering control, only requiring other libraries that wish to "plug in" to Nifty (LibGDX, LWJGL, JOGL, etc) to implement a simple OpenGL interface, and a couple other simple interfaces for the creation of mouse cursors, buffers, and images. There is also an OpenGL Core-Profile-based batched rendering system in Nifty, but as Slick cannot support this, it will not be mentioned here. You only need to know that a plugin library can either provide support for the compatibility batched rendering system (the one discussed here), or the core-profile batched rendering system, or both.
  • In order to integrate Slick with the compatibility (non-core profile) batched rendering system in Nifty, it means that Slick must be able to surrender UI rendering control completely. The way that this is accomplished is by bypassing the Slick renderers completely and accessing OpenGL straight from the underlying LWJGL, which Slick is a wrapper of.
  • Theoretically, the Slick-based rendering system (the one being bypassed) could still be used for non-UI game rendering, while UI rendering would be managed by Nifty. What this means is that you could continue to use Slick in the way that you are used to, as the changes will only affect Nifty under the hood, so to speak. I say "theoretically" because this has not been tested. The nifty-examples-slick package provided with Nifty only demonstrates pure UI rendering meaning that there is no game being rendered by Slick underneath the UI.
  • So, nifty-renderer-slick can now work with the batched rendering system (compatibility / non-core profile only). If you use the provided Slick convenience classes, such as NiftyGame & NiftyGameState, the new batched renderer is used automatically. If for some reason you wish to create/initialize/manage the Nifty instance yourself, you pass in:
  • new BatchRenderDevice(SlickBatchRenderBackendFactory.create(), ...);
  • as the first parameter (RenderDevice) to the Nifty instance.
  • SlickRenderDevice has been marked as deprecated, and is no longer used internally.
  • The new batch rendering classes are in a new 'batch' package inside de.lessvoid.nifty.slick2d.render, to prevent confusion / mixing with the old rendering system classes.
  • The examples in nifty-examples-slick have been modified to work automatically with the new batched renderer, and integration testing shows that they work just fine (Caveat: there is some small artifact in the top left corner of every screen which I believe may be some kind of FPS counter that does not display properly, hopefully someone can fix this.)
  • That said, this feature should be viewed more as a band-aid to an outdated and (mostly) dead library.
  • Merge pull request #257 from 3xp0n3nt/sizevalue-float-percentage
  • Allow SizeValue floating point values.
  • Merge pull request #256 from 3xp0n3nt/activate-click-release-bug
  • Fix NiftyStandardInputEvent.Activate bug.
  • Allow SizeValue floating point values.
  • Modify the internal storage of SizeValue to use a float rather than an int to allow for floating point values in SizeValue strings.
  • Add SizeValue tests to verify that floating point strings are accepted as valid values and are parsed correctly.
  • SizeValue.getValueAsInt now rounds the floating point pixel values to the nearest integer using Math.round, which is the safest way to do it. It is also consistent with the already existing behavior for floating point percentage values, which already uses Math.round in the getValueAsInt method (it was added to fix a subtle truncation bug causing off-by-one pixel errors).
  • Fix failing tests in nifty-core/src/main/test/java/de/lessvoid/nifty/layout package by verifying resulting SizeValue strings as a decimal value instead of an integer value. For example, new SizeValue("100px").toString() will now equal "100.0px" instead of "100px".
  • The SizeValue.toString method is the only place where the extra ".0" in (for example) "100.0px" as a string will come into play because even though most of the time it will be a whole number, now there is the chance that it could be something like "100.5px". It seems to be the most reasonable behavior to always have the decimal and trailing zero for "whole number" SizeValue.toString outputs, rather than only having the decimal when it is not ".0". This could be considered a significant change, but it doesn't break anything because only the output format is changing SizeValue still accepts "100px" (with no decimal) as a valid value, it just converts it to "100.0px".
  • The SizeValue equals & hashcode methods were deleted and replaced by auto-generated versions from IntelliJ, which are safe because they both rely on the Float.floatToIntBits under the hood for the internally stored float value. Tests have been added to SizeValueTest to verify that equals is working correctly. For example, new SizeValue ("10.0px") should be equal to new SizeValue ("10px"), but new SizeValue ("10.0001px") should not be equal to new SizeValue ("10px") nor new SizeValue ("10.0002px").
  • Fixes #244.
  • Fix NiftyStandardInputEvent.Activate bug.
  • NiftyStandardInputEvent.Activate only simulates a mouse click, but not a mouse release. This causes a bug where only listening for ButtonReleasedEvent's but not ButtonClickedEvent's for a specific button will cause input mappings to NiftyStandardInputEvent.Activate to not work with that button. This results in undesirable & unexpected behavior such as pressing the enter key on a currently focused button does not do anything.
  • The solution is to make NiftyStandardInputEvent.Activate simulate a mouse click and a mouse release, so that when NiftyStandardInputEvent.Activate is triggered, a ButtonReleasedEvent is fired in addition to the ButtonClickedEvent.
  • Update to 1.4.1-SNAPSHOT to fix compiler errors
  • Merge pull request #255 from 3xp0n3nt/libgdx-cleanup
  • Minor LibGDX examples cleanup.
  • Merge pull request #250 from relu91/1.4
  • Multiclick support for builders
  • Minor LibGDX examples cleanup.
  • Upgrade Nifty version in LibGDX examples. Pom value in nifty-examples-libgdx pom incorrectly specifies 1.4.0. Change to 1.4.1-SNAPSHOT.
  • Fix LibGDX android examples. Remove nonexistent configuration value 'useGL20'.
  • Multiclick support for builders
  • This commit adds multiclick support for builders and also a little example about how to use multi click.
  • Health image example added you know, like for health bars and stuff
  • there are probably better ways to do the same but that's what I've come up with ... anyone care to improve? :)

New in version 1.4.0 (July 10th, 2014)

  • jogamp.version: 2.1.5-01
  • fix: wrong nifty-lwjgl-renderer version
  • Merge pull request #241 from mkaring/1.4
  • Changed search for a droppable
  • jglfont-core-1.4 added
  • Stop the search for droppables in case a element that consumes (is visible to) mouse events is located covering any other droppable
  • use pgp-maven-plugin instead of gpg-maven-plugin for release signing
  • fix(jogl): missing shader files added and unused shaders removed (core)
  • fix(jogl): removed getGL2() for some GL calls
  • Merge pull request #240 from 3xp0n3nt/fix-broken-build
  • Fix broken build from JGLFontRenderer API change.
  • Fix broken build from JGLFontRenderer API change.

New in version 1.3 (June 27th, 2011)

  • Feature: Color handling improved: Invalid Colors are now reported in the
  • log and automatically set to #ffffffff instead of crashing :) and there
  • is now automatic extension of missing alpha values so a color like: "#123"
  • will not lead to an Exception anymore but is instead used with an automatic
  • alpha of "#f" so that the final color will be: "#123f" and this works for
  • long mode too ("#102030" -> "#102030ff")
  • Feature: cmd+x, cmd+c, cmd+v support on mac for instance for textfield
  • controls
  • Bugfix: #2948096: Change Text of ButtonControl
  • The following methods have been added to the ButtonControl: setText(),
  • getTextWidth(), getTextHeight(), getFont(), setFont(), setTextVAlign(),
  • setTextHAlign(), setColor(). This methods are for easy access to the
  • underlying elements so now you can change the Buttontext without
  • knowing the internal working of the Control. Just as one would expect.
  • Bugfix: #2956092: Dynamically Resize Buttons according to the text
  • The default behaviour of Buttoncontrols is to use the fixed width that
  • is definied in the style file. This hasn't been changed. If you simply
  • add a button control you will still get a button with a fixed width in
  • pixels that won't change if you change the text. You can specify a
  • different fixed size with the width property to override the default
  • width from the style when you use the button. What have been changed now
  • is, that when the button has no width set (from either the style or the
  • tag) then the button will always resize to
  • the text content. Because the style always comes with a default width
  • at the moment you'll need to manually override the width when you use
  • the button with an empty string. Example:
  • . This way the button does not have a
  • fixed width anymore and therefore it will be changed to the size of the
  • text. This will even work if you dynamically change the button text from
  • code. Remember that at the moment you still need to manually request a
  • relayout of the screen (screen.layoutLayers()).Note: To get the
  • automatic resizing working the CenterLayout layout type has been changed.
  • If you use a childLayout="center" for an element and this element does not
  • have a width constraint and the first child of this element (the actual
  • element that gets centered by the CenterLayout) has a fixed size than the
  • element you attached the "center" layout to it will be resized to the size
  • of the first element. If you don't want that to happen then you always
  • need to specify a width property to the element.
  • Bugfix: reset isCalculatedLineWrapping flag when TextRenderer text is
  • changed. this will trigger the relayout of the text element when text
  • wrapping is true and allows dynamically changing text with enabled text
  • wraping.
  • Bugfix: fixed rendering of unsupported characters (removed NPE)
  • Bugfix: unicode support fix for font rendering
  • Feature: allow popup creation with overriding style
  • Feature: additional smaller optimizations to the renderer
  • Feature: layout improvements: automatic text wrapping lead to a number of
  • changes in the layout algorithm to account for situations where nifty
  • automatically calculated the width of elements that had no width constraint
  • attached. layout is now a two pass mechanism to fix widths on the first
  • path and allow corrent line wrapping in the second pass.
  • Bugfix: delayed method invoke to end of frame for all callbacks. this should
  • resolve problems when a callback modifies existing elements.
  • Feature: setStyle() method to change styles will now not only affect
  • attributes of the element but it now does work for effects and interact
  • child attributes too
  • Feature: getVolume() method added to SoundHandle interface
  • Feature: getVolume() method added to SoundHandle interface
  • Bugfix: calling of onEndScreen() method on ScreenController fixed
  • Feature: fadeMusic effect added
  • Bugfix: made the padding attribute actual work with vertical and horizontal
  • layout managers
  • Feature: added "volume" attribute to playSound effect to adjust volume of
  • played sound. volume is a SizeValue so it is specified in percent,
  • example: volume="75%"
  • Feature: public extended SoundHandle interface with isPlaying() method
  • Bugfix: fixed SinusRaisedPulsator start value to 0 instead of 0.5
  • Bugfix: work in progress bugfix: if you combine an alpha changing effect
  • for instance fade with some element that changes the alpha too your changed
  • alpha by the element did overwrite the effect alpha. this caused some ugly
  • issues where the element was rendered with the original alpha values for
  • instance from #0 to #f and then jumped back to the actual alpha value,
  • say: #a when the effect ended. in this case the alpha value of the element
  • will win now. It's not sure if a) this fixes all issues and b) this might
  • cause other issues we'll watch this and correct if necessary
  • Feature: extended SoundHandle interface with isPlaying() method
  • Bugfix: work in progress fixing the padding feature for all layout managers
  • Feature: made the "pulsate" effect aware of the time, especially enabled
  • "startDelay" attribute and the pulsate is being reset to the beginning
  • when the effect actually starts
  • Feature: added "repeat" boolean attribute to the PlaySound effect to
  • autorepeat the played sound/music when repeat is set to "true"
  • Feature: made gradient effect aware of the time (this allows the gradient
  • effect work together with the startDelay attribute)
  • Bugfix: fixed border effect rendering
  • Bugfix: Textrendering: Fixed problems with changed alpha values and
  • colored text (Fade Effect) and fixed bug where changing colored inline
  • in text rendered unwanted characters
  • Feature: added "gradient" to the NiftyDefaults so that it is available
  • as a standard effect made the new renderQuad methods in the RenderEngine
  • aware of the current position so that for instance gradients can be
  • manipulated by the move or shake effects too
  • Bugfix: let mouse events travel down the element graph even when in
  • onStartScreen or onEndScreen "mode". this prevents events from being
  • lost. still interaction is not allowed while these two effects are active
  • but this is now prevented at element level when onStartScreen/onEndScreen
  • is active and not at screen/layer level anymore. additionally this commit
  • fixes a problem using alternate mode together with dynamically created
  • events. newly created elements did not take the alternate key into account
  • until now.
  • Feature: use instead of now.
  • the name attribute will be available but is deprecated.
  • Bugfix: fixed mouse clicked bug
  • Feature: added changeColorOnly="true|false" parameter to the pulsate effect.
  • when set to "true" the effect will only change the current color and when
  • set to false (which is the default) it will draw a colored an additional quad.
  • Feature: added callback to elementremove (internal) so that you can start
  • something when the element is really removed. element.remove() will be delayed
  • normally to the end of the render of the current frame
  • Feature: gradient now supports effectValues instead of fixed color values
  • Feature: text rendering with automatic line wrapping added: wrap="true"
  • together with a fixed width will automatically wrap text
  • Bugfix: fixed CenterLayout bug in right align mode
  • Feature: getAsColor helper added to Attributes
  • Feature: added special SinusRaisedPulsator that creates sinus values between
  • 0 and 1
  • Feature: gradient quad rendering with respect to current color alpha
  • Bugfix: fixed CenterLayout bug in right align mode
  • Feature: #2907132: Create Checkbox in unchecked State added attribute
  • checked="true|false" to checkbox control and refactored layout mechanism to
  • allow text wrapping
  • Feature: #2903207: Effects on TextField The TextColor effect will now use the
  • changed alpha value of the NiftyRenderEngine. This means that the TextColor
  • effect can be affected by other effects that change the current alpha value.
  • Feature: added a new method to the RenderDevice to render a quad with different
  • colors at the vertices for gradient effect support made linearInterpolator for
  • effect values a special case if there are effect values available with the
  • attribute "time". effect values are now always available to the effect implementations.
  • this allows for effect specific interpretation of the effect values and does not
  • force the usage of linearInterpolator.
  • Feature: LinearInterpolation KeyFrames for ImageSize and Fade effects. This
  • means you can now add: to the effects. applying a
  • style to any xml element and changing attributes in that element will now overwrite
  • the attributes from the style with the ones from the element. in the past the
  • style attributes always won. this might or might not change existing guis. but
  • it is now much more obvious IMHO
  • Bugfix: #2868002: TextRenderer always used the initial font for alignment calc
  • fixed! now the changed font is used for alignment calculation too
  • Feature: #2855595: Relax sequence of xml elements especially tags the
  • order of nifty main elements can now freely decided and are not constraint to a
  • certain order anymore final methods make sometimes sense but not really at the
  • element class ...
  • Bugfix: #2859600: ScreenController methods are called twice Ok, not sure if this
  • really fixes all issues BUT I've now changed it like this:
  • a) NiftyGameState.loadXml() will now only load the xml and not automatically
  • call onStartScreen() b) NiftyGameState.enter() does now check if there is a
  • "current" Screen and if so, it starts it with onStartScreen() is there no current
  • Screen it starts a screen with the name "start" (as loadXml() did before)
  • c) there is now a new method NiftyGameState.gotoScreen() that let's you goto a
  • different screen if you want (for instance after you've load a new xml with
  • loadXml() you can now select another screen to goto)d) not really related:
  • NiftyGameState now gives you the Nifty instance with getNifty() so that you can
  • easily do all sorts of things
  • Bugfix: #2855590: lastMouseDown flag not cleared when screen ends (Slick)
  • pending mouse events and especially the lastMouseDown flag are now automatically
  • cleared in onStartScreen and onEndScreen events. if necessary you can call
  • nifty.resetEvents() if you need to reset the events in special cases.
  • Bugfix: onStartScreen() of a ScreenController will now allow changing of the
  • current screen independently of any onStart effects (in former version this
  • was for some odd reason only possibly if you have any onStart effects on
  • any element of your screen. if you had none changing the current screen in
  • onStartScreen() was simply ignored. not it works for both cases)

New in version 0.0.5 (May 15th, 2009)

  • changed GL_CLIP_PLANES into glScissor() for better compatibilty in clipping
  • changed font loading to ResouceLoader from slick (no need to add local resources to the classpath when testing)
  • added property passwordChar="$passwordChar" to the TextFieldControl so you can create password fields now too :)
  • moved resources and xml styles into separate nifty-default-styles.jar
  • all effects now allow the length attribute to be set to "infinite" to create "endless" effects. this was possible before with using timeType="infinite" (and still is) but the new method might be a bit more appropriate
  • added support to save the "clip" RenderState. Changing the clipping region can now be used be effects too.
  • supports a "onRelease" event for mouse buttons too
  • introduced MouseOverEvent do not only add mouse over effects but also to react to them
  • New Effects: "border", "clip", "hideElement" and "remote" (see upcoming blog posts for details)
  • hover effects can now handle deactivate (kinda lost hover event) too
  • make sure to render hover effects before static effects
  • Standard Drop Down Control added
  • more dynamic popups added (popups created on the fly in code)
  • password protected text fields won't cut or copy any values out
  • maxLength() attribute added to the Textfield control
  • correct handling of $ parameter attributes in controls
  • setCursorPosition() method added to the TextFieldControl to change the cursor position
  • helper method "screen.findControl" added to make accessing controls easier