New Widget Tests

so whats this "data/font/Default.glf" thing? am i right in saying that it might be a speg font?

if it is, how would i be able to obtain it?

It is a font file generated by glFont. You can read more about it from Gregg’s explaination here: This is from an e-mail Gregg sent me.

Default.glf is a file produced by an application called glFont, ( ), which produces a bitmap with some character size info and alpha channel info.

I'll go ahead and commit the file into the data/font directory in CVS. So, Gregg, don't worry about it.

Ok, the font file is in CVS, tests should work now.

kewlies, il try and get em working!! in the meantime, il get back to my hopeless problem on the particleSystem!! btw, what version would you like to see the particleSystem be in?

I wasn’t planning on getting Particle System until 0.8. So there is plenty of time. :slight_smile:

awsome, and the GUI looks like CDE, and I like that!! yay!

I had an exception occur in the second test:

java.lang.IllegalArgumentException: n must be positive
   at java.util.Random.nextInt(Unknown Source)
   at com.jme.widget.test.WidgetTestApp2$TestFrame.shuffle(Unknown Source)
   at com.jme.widget.test.WidgetTestApp2.initGame(Unknown Source)
   at Source)
   at Test.main(


It looks like the nextInt method is getting a negative number. If you look at the code in the shuffle method you can see the widget’s preferred size is being subtracted from the display width and height.

int x = random.nextInt((int) (display.getWidth() - widget.getPreferredSize().x));

For some reason display.getWidth() or display.getHeight() is to small resulting in a negative number.


aaah, i usually run my tests on 640x480x16, you know, to get the minimum kinda thing. Do you reckon i should try a higher setting and see how I get on?

P.S. Im at school at the moment, that why i cant test it!!

just ran it at lowest res here, and didn’t get that error. Strange.

fair enough, would I need anything other than Default.glf to run it?

Default.glf is the only font file you need.

One thing you might try is printing out display width and height along with the widget’s preferred size.

That might give us more of a clue about where the problem is.


you know what? i think it might be this crappy HW, im going to try it on a better one. See how that goes tomorrow!