Nifty Questions

Sorry to ping you like this @Void256 but I’ve accumulated a few Nifty questions and imagined the answers might be useful for at least some other people too. :slight_smile: I’ve been through the manual and wiki pages and have failed to find answers to them so far!


  1. If I want to “fade in” a scene behind the gui then I can use a nifty layer set to all black and use an alpha fade to fade from f->0 at the start screen and back from 0->f at the end of the screen. The question is whether nifty has the knowledge to just skip rendering entirely once the neverStopRendering fade hits f or whether its going to be a constant overhead drawing an invisible layer. If so then what’s the recommended way to do that? a hide effect once the fade completes? My computer here shows negligible slowdown even when the effect is active so it’s hard to say whether it’s doing anything or not!


  2. I’ve discovered that if I trigger an effect on the root node of a screen then it gets triggered on all child nodes which is good. I can start groups of customKey effects that way. I don’t see a way to cancel groups of customKey effects though - I can only cancel all customKey effects.


  3. Is there any work around/fix for the text wrapping problem in text areas (when you modify the text after the screen has loaded then it doesn’t get wrapped immediately and runs out of the panel).


  4. What’s the proper “official” location of the latest source? I found https://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Build_from_Source but all the posts seem to be talking about Git not SVN.


  5. Other than finding the source (see 4) is there any documentation anywhere of the parameters etc of the effects listed https://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Effects that say TODO.



    I think that will do for now, thanks in advance :slight_smile:



    Zarch
1 Like

1 - Hide the layer once it’s been “used”. setVisible(false)



2 - No idea on that one.



3 - IIRC there’s a couple of threads about that.



4 - Nifty is now hosted on Git. The old repo is still there, but that’s not where the latest builds are if my memory is right.



5 - Nope. Use the Code Luke. :wink:

2 Likes
@madjack said:
3 - IIRC there's a couple of threads about that.


I found a couple of threads but they were all asking/reporting but no solution. I'm manually wrapping the text to fixed width at the moment as a work around but that's far from ideal.

@madjack said:
4 - Nifty is now hosted on Git. The old repo is still there, but that's not where the latest builds are if my memory is right.


Guess I need to install Git then. My first few experiments with it were not impressed :s

Do you have details for the Git repository?

Someone should really delete and/or modify that wiki page as well.

@madjack said:
5 - Nope. Use the Code Luke. ;)


I would if I could find it. See 4 ;)

Code is here.

1 Like

At the right side of the jme forum there is a Drag & Drop Help box.

Theres a link to a “nifty bible”, perhaps some questions are answered there.



Regards

That’s the nifty manual, if it answers these questions then I missed them…and I’ve read it all once and most of it multiple times :wink:

@zarch said:
1. The question is whether nifty has the knowledge to just skip rendering entirely once the neverStopRendering fade hits f or whether its going to be a constant overhead drawing an invisible layer.


Not currently.

If so then what's the recommended way to do that?


What madjack said :) Hide what you don't want to be drawn or maybe even consider not calling/drawing Nifty at all. There's no point in updating a GUI when you don't need it I think.

2. I don't see a way to cancel groups of customKey effects though - I can only cancel all customKey effects


public void resetSingleEffect(EffectEventId effectEventId, String customKey) at the Element class should help :) The name of the method is a bit crap in retrospect - not sure why this is not called stopEffect() :/

3. Is there any work around/fix for the text wrapping problem in text areas.


I've not looked into this yet.

4. What's the proper "official" location of the latest source?


git of course :) as documented on the sf.net project page.

5. is there any documentation anywhere of the parameters etc of the effects listed https://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Effects that say TODO.


Unfortunately not. But now that you know where the source is you can take a look at the code ;) Effects are not complicated.

Since the Nifty manual is available most of the information in the wiki is outdated, unfortunately. It should really be cleaned up and only keep the controls and effects reference and mabye some howtos. All of the other information is better explained in the manual.

My day only has 24 hours :) Wiki-Help is appreciated of course! *glare-at-madjack* ;)
2 Likes
@void256 said:

What madjack said :) Hide what you don't want to be drawn or maybe even consider not calling/drawing Nifty at all. There's no point in updating a GUI when you don't need it I thinh.



Well I'll still be drawing the rest of the GUI, this is just to fade in the 3d scene behind the HUD by putting a black layer at the back of nifty and fading it out.

@void256 said:

My day only has 24 hours :) Wiki-Help is appreciated of course! *stares-to-madjack* ;)


I'd be happy to edit a few wiki pages if it will help. I can at least delete out of date information (i.e. the SVN stuff!) as I come across it or fill in the parameters on effects after I work them out or similar.

Thanks for the answers

Zarch
:)

@Zarch: for being an editor on the sf.net wiki you’ll need a sf.net account and you’ll need to write me an email: void256 ( a t ) users.sourceforge (dot) net an email! thanks! :slight_smile:

wiki editor access granted :smiley:



thank you!

Yeah yeah. Glare all you want void.



@Zarch watch out though. If you send him a bug report that email might vanish out of thin air before it reaches him. :roll:

1 Like

Yeah - that’s why in general it’s a better idea to post a bug report to the bug tracker at sf.net :stuck_out_tongue: … so that it can be ignored there :smiley: … just kidding

@void256 said:
Yeah - that's why in general it's a better idea to post a bug report to the bug tracker at sf.net :P ... so that it can be ignored there :D ... just kidding


http://i.imgur.com/kXpG9.jpg

http://i.imgur.com/90Nqy.jpg

Speaks for itself really :(

Any ideas? I've never used Git before but I've used a bunch of other source control systems.
@void256 said:
Yeah - that's why in general it's a better idea to post a bug report to the bug tracker at sf.net :P ... so that it can be ignored there :D ... just kidding


I will say this once. If you have an issue with it, contact me by PM.

You asked me to help in the wiki. I was a willing (and glad) participant. So I worked on this, added many entries.

At one point I found what I thought was oddities and not knowing if it was me, the code or something else, I contacted you privately to determine the best course of action. That was mostly ignored.

Do NOT ask for help if you don't have the time, or can't be bothered with a follow through. As you (mostly since you're asking for donations) we're doing this out of our heart and free time. We give time to improve the library, which is great, although very frustrating at times, by documenting it and I have been thanked in my attempts at communications by being ignored.

I'm willing to post bug reports when I'm certain the behavior encountered is erroneous, not when I think something's wrong or for every little thing that seems out of place.

In short, help is reciprocal. If you want others to help you, help them too.

I don't think that's too much to ask.

/rant
1 Like

@madjack:

WTF? Oo incredibly-funny-rant-response-talking-about-donation-payed-ferraries-mansions-and-playboy-bunnies



@zarch:

Unfortunately the sf.net Nifty project page lists the wrong repository under its “code / git” menu - which was the one you’ve tried.



The “develop” menu - which I’ve posted: https://sourceforge.net/projects/nifty-gui/develop shows the right URL which is:



[java]git clone git://nifty-gui.git.sourceforge.net/gitroot/nifty-gui/nifty[/java]



git://nifty-gui.git.sourceforge.net/gitroot/nifty-gui/nifty-gui WRONG WRONG WRONG :slight_smile:



So the correct URL ends with “nifty” and not with “nifty-gui”! Sorry about this! I’ve talked to the sf.net tech support on IRC and this can’t be changed at the moment. Which is a real pitty :confused:



PS: To confuse you even more :slight_smile: Nifty is also hosted at github. Here is the URL to the project page over there: https://github.com/void256/nifty-gui and you can find the git repo URL at the top right on that page.



Currently both repos should be in synch (which is a manual process but it’s simple and easy because of git). Nifty might move completely to github some day since github is really incredible awesome and makes cooperating with other people so much easier. Applying merge requests (patches) and so on. But at the moment Nifty still kinda lives at both sites.

Ok, wiki page updated:

2 Likes

great work! thanks!