Hi, I'm attaching the needed files in files2.zip. The behaviour I expect is that the image fades in and out constantly. The result of the code seems to be fading in properly (only the first time) and then only the fade out is properly displayed. The fade in is indeed executed but it seems nifty is not rendering it. Let me know if you need anything else.
2012-02-01 08:40:30 PST in nifty-gui
Hi, I think I've been having similar issues. But I went crazy about sizing elements and it's not quite clear the effect of having width="10px", width="*", width="" and not even having a width value on the different elements Button, Text, Label, etc. To be honest, I always test all of them to see which of them suits my needs but most of the cases trying to...
2012-01-21 18:32:46 PST in nifty-gui
Hi, I noticed Nifty's rendering is done after the rendering of the application when using NiftyOverlayBasicGameState. It would be a good idea to have some kind of layer that would allow to draw the application on it. I notcied that I can change the order of what is drawn between the app and nifty (see this ticket https://sourceforge.net/projects/nifty-gui/forums/forum/807893/topic/4949582).....
2012-01-21 16:37:48 PST in nifty-gui
Hi, It seems the markup ${CALL.method()} searches the method "method()" directly into the ScreenController (at least when using a controlDefinition). It doesn't seem to be a good idea to do this, because I can't properly separate the control's Controller from the ScreenController (which should be quite different things). This is an example: <controlDefinition...
2012-01-19 20:40:27 PST in nifty-gui
Hi, I just noticed that the following code works fine: <screen id="GamePlay" controller="game.states.controllers.GamePlayController"> <layer id="layer1" childLayout="center"> <panel childLayout="horizontal" height="${CALL.test()}px" /> </layer> </screen> However, the following...
2012-01-19 20:33:28 PST in nifty-gui
LOL: SourceForge wont allow me to attach a file ¬¬ Here is the new [url=https://gist.github.com/1619360]class[/url].
2012-01-15 22:18:45 PST in nifty-gui
Hi, Before I started using nifty, I was extending from slicks StateBasedGame for my game class and from BasicGameState for the game states. In each state, I had this method to render the game: [code]public void render(final GameContainer gc, final StateBasedGame sbg, final Graphics g) { model(gc, sbg, g); }[/code] In order to switch to nifty as far as I understand, I had to extend...
2012-01-15 22:13:44 PST in nifty-gui
Hi, I've found myself doing this all the time. Probably I'm doing it wrong, but this is the way I understand things should be done: [code]button.setWidth(new SizeValue(String.valueOf(maxValue) + SizeValue.PIXEL));[/code] Having this static methods would be better: [code]SizeValue.asPixel(int); SizeValue.asPercentage(int);[/code]...
2012-01-14 08:57:08 PST in nifty-gui
Ok, so this is what I understand. (I'll be descriptive so that if someone faces a similar issue will find a complete solution). 1. I shouldn't have a style with the id "menuButton" because after parsing the XML, there wouldn't actually exist a control element. It would have been decomposed in the text and panel 2. I must add for each subelement of the button (text and panel) a...
2012-01-14 07:59:52 PST in nifty-gui
Update: I can see in the nifty-button style definition a textVAlign attribute, but I don't see it in the XSD either.
2012-01-13 07:10:45 PST in nifty-gui