Page 1 of 1

stringw and double values

Posted: Fri Jul 15, 2005 7:53 pm
by rsdl
quick question...how do you output a double variables to a gui::IGUIStaticText object?


cheers

Posted: Fri Jul 15, 2005 9:25 pm
by Midnight
I could be wrong but I don't think you can output to static text can you?

getElementfromID(100->setText(X));

If you could I imagine it would go something like that.

as for double if it doesn't work you'll have to convert it into something else first...uhh look at the source to guice you might find something in there that will help.

maybe.

Good Luck!

Posted: Fri Jul 15, 2005 9:49 pm
by rsdl
you can output to static text. i tried outputting the fps counter to a static text object via the setText() method.

As for the doubles, yea i think i may have to convert it to an integer or something. :( I thought that there would be something like the printf() function where you could go printf("%f",someDoubleVariable) and then store that into a variable and use setText...but all my tests either didn't work or crashed the app entirely. heh.

anyway thanks for replying :D

Posted: Fri Jul 15, 2005 10:38 pm
by Midnight
lets see I'm totally in the dark here but logic serves me this:

()@%blah! %f loat? %d ynamic? %s tatic?

Am I correct with this? even close??

try this friend it's hit or miss with me %f %d %s

hell there must be more but they do different things..play with it.

Posted: Fri Jul 15, 2005 10:40 pm
by Midnight
show me a double variable lol.. and I'll show you the correct method.

I'm like an idiot savant with this poop lmfao...


I remember this thread about w_char strings or something... oh yes it was an float to editbox thread in beginners most likly..I'll try to find it. it may have direct relation to this problem.