stringw and double values

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rsdl
Posts: 13
Joined: Wed May 05, 2004 6:57 am
Location: Soviet Canuckistan

stringw and double values

Post by rsdl »

quick question...how do you output a double variables to a gui::IGUIStaticText object?


cheers
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post 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!
rsdl
Posts: 13
Joined: Wed May 05, 2004 6:57 am
Location: Soviet Canuckistan

Post 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
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post 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.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post 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.
Post Reply