My Writings. My Thoughts.
Nightly Builds Available
// May 14th, 2010 // No Comments » // bubble, docs
Nifty will now build each midnight automatically. Well, at least when this computer here is running at this time which, erm, should be often
Hudson will svn checkout all relevant nifty projects and will then “mvn clean deploy” them to the nifty maven repository at sf.net. This means that all projects that are already being build with maven and have this in their pom.xml:
<repositories>
<repository>
<id>nifty-maven-repo.sourceforge.net</id>
<url>http://nifty-gui.sourceforge.net/nifty-maven-repo</url>
</repository>
</repositories>
will automatically get the latest nifty builds!
Currently this means 1.2-SNAPSHOT for Nifty as well as the Nifty Default Controls and the black Style projects and 1.0-SNAPSHOT for the new Nifty Renderer Projects.
Currently the following projects are build each night.
Nifty
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty/
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-default-controls/
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-style-black/
Nifty Renderer
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-lwjgl-slick-renderer/
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-lwjgl-renderer/
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-slick-renderer/
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-java2d-renderer/
The JME2 Renderer currently has some weird problems being automatically build. So this is not yet available – still working on it:
http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty-jme-renderer/
If you’re not using Maven you should still be able to get the SNAPSHOT jars from the URLs mentioned above. Just find the sub directory 1.2-SNAPSHOT or 1.0-SNAPSHOT and get the latest JAR from there. Don’t mind the name of the jar tho. It’s automatically generated by Maven and it’s just named with the build date and time.
Good luck!
void
Nifty RenderDevices
// May 2nd, 2010 // No Comments » // Wiki Update
It’s still a bit early because most of the new RenderDevices are still in development but as a preview of the upcoming Nifty 1.2 RenderDevices we’ve collected all of them.
You can find a list of all RenderDevices for Nifty 1.2 in the Nifty wiki.
There is now a Nifty Renderer test bench project availabe too. This project can be used to verify correct rendering while a new RenderDevice is being developed.
void
In case you haved missed it …
// April 7th, 2010 // 1 Comment » // Uncategorized
… some very interessting developments are on the way:
http://jmonkeyengine.com/blog/blog/2010/04/06/jmonkeyengine-3-0-gets-a-very-nifty-gui/
http://www.jmonkeyengine.com/forum/index.php?topic=11246.msg98829#msg98829
And besides that, the current Nifty SVN has all dependencies to LWJGL and Slick2D removed!
Nifty is now completly independent of the actual rendering system!
There is a lwjgl-slick2d renderer already available here:
http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-lwjgl-slick-renderer/trunk/
There is a work in progress JME2 renderer available here:
http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-jme-renderer/trunk/
And the friendly people over at http://www.jmonkeyengine.com/ are already working on a JME3 nifty renderer too!
If you want to create your own Nifty renderer for some other rendering system, well, you can do that now too!
Take a look at the http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty/trunk/src/main/java/de/lessvoid/nifty/spi/ ServiceProviderInterface for Nifty rendering. What about a Java2D implementation?
void
Nifty 1.1 released
// March 22nd, 2010 // 7 Comments » // Uncategorized
Nifty 1.1 – Download it
Nifty 1.1 – View Changelog
Nifty 1.1 – Enjoy the Demo
And there is a special new tutorial/demo available too:
Nifty 1.1 – New Tutorial/Demo
have fun
Dynamically Changing Button Text/Width and the Centerlayout
// February 21st, 2010 // 1 Comment » // bubble, design
Jattra tries to dynamically change button text from within Java and he needs a Button that automatically resizes according to the width of the changed text.
You can follow both threads at the Nifty Help Forum at sf.net:
Read the complete blog post for details.
Continue Reading
New effect “gradient” Available
// December 6th, 2009 // No Comments » // Uncategorized
There is a new Effect available in SVN now. The “gradient” Effect allows you to draw vertical or horizontal gradients. You can use different colors and a percentage or pixel value for the position where the specific color should be.
Example:
<onActive name="gradient" direction="vertical"> <value offset="0%" color="#f00f" /> <value offset="20%" color="#0f0f" /> <value offset="60%" color="#00ff" /> <value offset="70%" color="#ff0f" /> <value offset="100%" color="#ffff" /> </onActive>
Result:
Awesome!
You can use different Alpha Values for the colors too to make a gradient overlay elements or you could change the blendMode to multiply before applying the gradient with the “blendMode” effect
Have Fun!
void
Nifty Snapshots are now available
// December 6th, 2009 // No Comments » // Uncategorized
To get access to the latest and greates Nifty, Snapshots (= Development Versions) are now available at the Nifty Maven Repository I’ve set up at sourceforge.net.
You can get the latest Snapshot here: http://nifty-gui.sourceforge.net/nifty-maven-repo/lessvoid/nifty/1.1-SNAPSHOT/
In case you’re using Maven you’ve probably already using this in your pom.xml:
<repositories> <repository> <id>nifty-maven-repo.sourceforge.net</id> <url>http://nifty-gui.sourceforge.net/nifty-maven-repo</url> </repository> </repositories>
You only need to change your nifty dependency to snapshot and you’re always using the latest Nifty Build:
<dependency> <groupId>lessvoid</groupId> <artifactId>nifty</artifactId> <version>1.1-SNAPSHOT</version> </dependency>
Good Luck and Have Fun!
void
Switching images with nifty effects in game
// November 1st, 2009 // 1 Comment » // Uncategorized
Someone over at the nifty forums asked how to switch images from java. You can find the thread and my answer here.
Well. So far so good but switching images can be a lot more exciting with nifty effects
So let’s start with adding a new effect and attach it to the image with the onCustom effect:
<image id="inventar" filename="icon1.png">
<effect>
<onCustom name="imageSize" startSize="1.7" endSize="1.0" length="150" />
</effect>
</image>
This adds an “imageSize” effect that starts with a imagesize of 1.7 times the original size and resizes the image back to the original size over the time of 150 ms. The “onCustom” effect means, that we can trigger this effect from java.
So when it comes time to change the image to the rocket launcher, the plasma gun or the BFG9000
we can use the following java code to trigger the effect and change the image:
getElement("inventar").getRenderer(ImageRenderer.class).setImage(iconRocketLauncher)
getElement("inventar").startEffect(EffectEventId.onCustom);
The first line changes the image and the second line triggers the onCustom effect.
I’ve updated the slick overlay example with a little nifty image switching in the right upper border of the screen. You can change the different images with pressing the keys “a”, “b” and “c”.
You can find it here:
http://nifty-gui.sourceforge.net/webstart/nifty-slick-overlay-demo.jnlp
and you can find the updated example in svn or you can browse it online here:
http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-examples/trunk/src/main/java/de/lessvoid/nifty/examples/slick/niftyoverlay/ (Java classes)
http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-examples/trunk/src/main/resources/slick/niftyoverlay/overlay.xml?revision=534&view=markup (Nifty XML for the Screen – overlay.xml)
Nifty!
New Feature – Keyframes for Nifty Effects
// October 27th, 2009 // No Comments » // bubble, design
Well, I’m currently rewriting the old Nifty Introduction Demonstration that somehow didn’t survive my last blog server switch
It was posted right here but the jnlp disappear. The demo explained some basic concepts of Nifty and it was written in Nifty
I’m rewritting it now to update it to the current Nifty Standards.
In the process I just want a moving Nifty GUI Logo like this one
So the logo should resize while fading in and keep on resizing while fading out.







