Nifty GUI alternative (or at least some documentation...)

Would you prefer they didn't? :P


To be honest, yes! :P if they just ask in a normal way they don't need to apologize afterwards, I think. Am I right madjack? :P

I really do understand that Nifty can be complicated and frustrating at times and I know that quite a lot of that frustration factor directly relates to missing documentation. It's just not that bitching alone will improve the situation...
1 Like

well if you can’t cope with criticism, then i can’t help you either. every great project can become useless, if it’s not user-friendly. and lack of documentation is not a way to attract developers. i didn’t apologize for my opinion, i apologized because i respect people who spend their time developing free software.



i’m gonna write this documentation for the xml schema and if you want to improve your api documentation i would gladly share it. that’s all i can offer. and as you can see ā€œbitchingā€ has actually improved the situation for me and maybe even for the api doc of nifty ;D

void256 said:
To be honest, yes! :P if they just ask in a normal way they don't need to apologize afterwards, I think. Am I right madjack? :P

Yes, I agree. But things are never "black and white".


I really do understand that Nifty can be complicated and frustrating at times and I know that quite a lot of that frustration factor directly relates to missing documentation. It's just not that bitching alone will improve the situation...

Switch place for a moment void. Imagine yourself in the shoes of someone starting up with Nifty. We all know how powerful it can be when properly used. There's no denying that. But when you spend countless hours adding, removing, tweaking, testing and the results are pretty much never what you expect, the experience is extremely frustrating. What I was talking about the other day about Nifty not crashing is, I think, one of the problem. It'll let things slide or if there's a warning, it's hidden in the mound of info and if your screen is slightly big, you'll never know it was there in the first place until you look. When something's wrong people expect a crash, not a warning. So if stuff is spewed in the console you don't even look at it because you expect these to be info and that's it. This is not bitching btw. :P

I did my share of bitching (and it was a long ass post too) but the point of that bitching is not to say "Void is an idiot and he should be crucified with a stinky rotten egg in his mouth!". No. It's just a way to vent steam and ask for help and honestly what else can they do? Nifty is the only alternative with jME (not that it's not the right choice, it is, but it's daunting at first) so because of that, people rage on the forum. I think what's happening is that you're taking those bitching sessions personal and they're not. Not really.

Of all people, YOU know how powerful Nifty is. But you, better than anyone else, also know how difficult it can be to learn Nifty at first, so don't take those posts personal. Let them vent. When they're done we'll give them a hand. :)

I think many of these issues will be solved when the NiftyGUI editor will be improved. Selecting an item from a drop down and then editing its properties in a list surely is easier than having to know what tags to use and what parameters to set for them. Even just having some kind of palette for the XML would already improve the situation I guess. Then from the code side the javadoc for nifty that has been added to the SDK now should further help I hope.

Any Nifty related help (wiki, patch, documentation, git fork, you name it) is more than welcome … and I’ll go and fix that Nifty keyboard release thing now… :slight_smile:



Doing things >>> Talking things :stuck_out_tongue:

Doing things might be >>> than talking things



But I think:



Talking about things = Doing much better things. :wink:

OK, after working with the xml schema for a while now i need some feedback from you, void, because i don’t know how far i could go without making my work worthless.



In my opinion the schema needs a little redesign, for two reasons:


  • partly it uses weak and inconsistent typing, e.g. strings where booleans should be or where a complex enum has already been defined in another place (these are easy to fix). But in other places there are no complex types where they would be really useful (e.g. for the >20 name values of all the effects), so here the schema needs to be extended to make documentation possible in the first place.

  • and secondly because the xsd-substitutions are used as a hack that makes documentation of elements impossible: substitutions are only meant to be aliases for one and the same thing, but in the schema they are used as a way to create an abstract "element" with concrete implementations such as control, image, label, ... problem is, that the IDE won't show you these aliases for good reason - and that you can create instances of this abstract element which are approved by the xsd but of course ignored by nifty itself. The solution would be to change the elementType to hold all the possible elements and to abandon this abstract "element" that is not allowed to be used by nifty anyway.


So, i think i could fix these issues but i'm worried that you may not want to use it because you have lost track of the changes or aren't comfortable with them.

I agree with the ā€œstrong typingā€ issues. These should be fixed (for instance a boolean type instead of a String where appropriate is really a great idea).



Complex types for effects are not in the schema because they are kinda flexible by nature and you can extend Nifty with your own effects as well (which won’t be a part of the schema then). On the other hand I’m not sure if you can really create a effect type in the schema and link it to the name attribute. Something like: ā€œ<onActive name=ā€œmoveā€ ā€¦ā€ - can you define a complex type with all the effect parameters for that move effect?



The ā€œhackā€ as you called it is simply there to not repeat the same attributes in the schema. The purpose is to combine all attributes that are common to ā€œpanelā€, ā€œtextā€ and ā€œimageā€ elements so that we don’t need to copy the same attributes three times in the schema.



So in general the Nifty XSD is a compromise between a complete description of everything that’s possible and still keeping it managable and somewhat easy to maintain. But yeah, if you can fix some of those things I’d be happy to accept a patch - or even better a git pull request for some fork :slight_smile:

One of these days I really need to put up some pages on the nifty wiki for the default controls. Since I’ve now almost written two myself I should be able to write up some basic documentation on a few of them.

@klamann I talked to zathras(doc author) and he sent me an example project using Nifty 1.3.



Going through the code might help others, whether for documentation or for games.

http://files.seapegasus.org/GuiTest.zip



!Happy Nifty!



@zathras The sample code attached with the documentation, http://files.seapegasus.org/NiftyGuiDemo.zip Doesn’t run. Says there are some missing packaged.



I posted a thread about it but there was no response. Here it is : NiftyDemo, Can’t find all necessary packages./

I replace the zip file with a version that works for me, try and report back whether that fixes it.



PS: This NiftyGuiDemo.zip is identical to void’s demo, I just made the main class a jme class. And changed the paths to the asset directory.

it runs fine.



btw, nice intro :wink: