Kiekos
Member
|
Gui Text problem
Hey there!
I've started making myself a debugger which would show current position of player, monster that I'm fighting and some other stuff.
I've prepared a function ftoa() which converts float to string so that I can draw it on the screen (I don't think there's a different way to draw it). So there's this thing:
Code:
Flt test = 12345.123;
D.text(0, 0, ftoa(test) );
And it works fine... I mean the number is drawn on the screen. But when I try to put the number into a Text in Gui object it shows "???" instead of the actual number.
Code:
Flt test = 12345.123;
debugger.getText("chr_pos_x").set( ftoa(test) );
And as I said before it results in "???" being put in the Text box...
Any help will be much appreciated,
Kiekos
(This post was last modified: 12-03-2013 12:41 PM by Kiekos.)
|
|
12-02-2013 07:29 PM |
|
Esenthel
Administrator
|
RE: Gui Text problem
please use "S+1.234"
"S+test"
|
|
12-02-2013 11:18 PM |
|
Rofar
Member
|
RE: Gui Text problem
Also, there is an engine function for converting floats to strings...TextFlt().
|
|
12-02-2013 11:53 PM |
|
Kiekos
Member
|
RE: Gui Text problem
Yep, that works! Thanks
|
|
12-03-2013 01:53 PM |
|