…g the hint layer rather than exactly one
…effect is enabled. This was previously done in a check that could never occur (due to a refactor)
Added fixes for font where font: - Lines where rendering too close to each other. Added a 142% increase in font height to separate them more. - RGB numbers for fonts were jumbled. Fixed with the correct values. Added option to define nifty gui size.
Both were initialized lazily in the beginFrame() method which is only called when rendering Nifty. Therefore it was possible that the graphics and graphics2dHelper member variables were null before the first call of nifty.render(). However for getting RenderFont attributes (like the width) the Java2D implementation required the graphics instance! But it is very likely that you call fromXml() before the very first frame being renderedn and you'd end up with a none-initialized graphics member variable and therefore a font.getWidth() call returns 0. I think this lead to a lot of issues one reported was that wrap="true" did not work unless render() was called at least once. So this commit will init both variables directly in the constructor fixing this! fix #317 wrap="true" does not work in Java2D renderer
The "reverse" parameter allows the effect to begin in the applied state, progressing towards the unapplied state. Useful for ImageOverlayPulsate effect to fade out from an ImageOverlay effect.
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. #303
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.
The commit 77059d2 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.
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. #246
-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.
-JoglMouseCursor initializer now uses BufferedImage.getRGB instead of getRaster().getData()
-> TextRenderer.setText/setLabel were placed before setStyle in ChatBoxViewConverter; this caused setStyle to overwrite the submitted text because it calls setStyle(<original text>). Both method calls were moved after setStyle. This *seems* to have resolved the issue. Fixes #293