Changing Text Size of a label nifty gui

I like nifty gui but access to the docs is absolutely attrocious and needs to be fixed.



I am becoming quite fedup trying to workout how I set the size of the text inside a label.



Please help void.



Andy :smiley:

1 Like

You can't currenty set the text size of a Label in Nifty. This is mainly due to the use of bitmap based fonts which usually don't resize very well. You need to use different fonts for best visual appearance if you need different text sizes.


but access to the docs is absolutely attrocious and needs to be fixed.


Again, Nifty is developed in my free time and that time is usually limited. It is open source tho. You are free to read it, modify it or help documenting it! Get involved! Help to improve it!

Or donate for it so that I can make a living from writing docs all day long :D

I'm sorry for the lack of documentation and/or features and/or its suitability for a special purpose. You probably won't wake up one day and find a 200 page Nifty book ... unless you help writing it!

Every other small project ive come across still documents how to use its stuff.



So the inability of being able to size text means what? Can you point me at a font maker which will let me pick a font size ?!?!?!?!

renegadeandy said:

Every other small project ive come across still documents how to use its stuff.
So the inability of being able to size text means what? Can you point me at a font maker which will let me pick a font size ?!?!?!?!

Have you documented somewhere how to use *you* and where your off-switch is? Also, have you created a whole GUI system from scratch and donated it to the world or something similar? If not, please dont try to tell people who did that how easy it is to create documentation for it.
If you want to bash me, thats ok, we have kind of a relationship here thru PM etc. but please be polite when asking others for help. You are receiving lots of help here and a minor annoyance like this (where you are even presented a solution that you just dont understand) should not keep you from being polite.
Can you point me at a font maker which will let me pick a font size ?!?!?!?!


Nifty is using the very common angelcode bitmap font file format. You can find the original tool and the format description here http://www.angelcode.com/products/bmfont/.

Slick2d uses these kind of fonts too and there is a java tool part of Slick to create the fonts too. You can find the original version here http://slick.cokeandcode.com/demos/hiero.jnlp or an updated different version 2.0 here http://www.n4te.com/hiero/hiero.jnlp.

Every other small project ive come across still documents how to use its stuff.


Nifty is doing the same. It's just not complete yet and it's not a "small" project anymore.

I can hear the complaints and I know about the lack of documentation in some parts. It's just not that I'm too stupid or too lazy to write proper documentation ... it's just a lack of time/resources.
1 Like

Well tbh im surprised its jme3s flagship gui library when it has such little documentation - what the heck do you expect!?



Yes hes doing it for free, yes its a spare time project - and hence why it has quite major gaps in its resources.



A couple of VERY quick changes would make masses of difference :



An online javadoc documenting the api

A list of all possible xml controls and xml attributes

A list of all possible xml controls and xml attributes


There is a XML Schema available for Nifty XML-Files. You can find it here: http://nifty-gui.sourceforge.net/nifty.xsd It descibes a huge portion of what is allowed in Nifty XML-Files and what is not allowed. You can now even validate Nifty XML-Files against this schema using new methods on the Nifty class.

Nifty user Tumaini has started a documentation project in the Nifty wiki. You can find it here http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Elements. It's currently just a beginning. Why don't you help to extend it?
O_o wtf? I don't think calling people "idiot" or being offended won't help a bit? That's kinda odd ...  huh


Hmm,...ok! I deleted it from my post! The idiot thing... People like him make me angry. Just demanding,
demanding, demanding,...

Aslong as people are respectful I am as well, if not I give echo...
"Wie man in den Wald hineinruft, so schallt es heraus"



right… well i guess im not wantd around here. Thanks for your support.



Andy

Nice work ttrocha with the textSize effect applied to onActive! I was about to suggest that solution too! Nice that you've shared it! :slight_smile:



@both of you:

O_o wtf? I don't think calling people "idiot" or being offended won't help a bit? That's kinda odd …  :?

Just thought I’d add the link to the javadoc for nifty 1.1.

http://sourceforge.net/projects/nifty-gui/files/nifty-gui/1.1/nifty-1.1-javadoc.jar/download

Nifty is pretty straight forward though and logical, so it’s not hard to figure out how to do things.

I was also wondering about the font size thing before, but having found out it was bitmap fonts, it’s also quite logical.

I haven’t had time to add more to the elements list on the wiki lately, but I’ll try and do so when I do have time again.