formatting numbers?? -> there a way?
Author |
Message |
Pear-i
|
Posted: Fri Apr 11, 2003 5:31 pm Post subject: formatting numbers?? -> there a way? |
|
|
how would i format numbers?
like say use different fonts / colours (just like the normal font code)
I tried changing it to Ascii.. but doesn't seem to work..
any ideas? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Asok
|
Posted: Fri Apr 11, 2003 5:33 pm Post subject: (No subject) |
|
|
can you give a more specific example of what you need? |
|
|
|
|
|
Blade
|
Posted: Fri Apr 11, 2003 6:01 pm Post subject: (No subject) |
|
|
i'm taking a guess but this is what i think you want... Font.New (fontSelectStr : string) : int
and Font.Draw (txtStr : string, x, y, fontID, Color : int)
you would use it like this:
code: | var font1:int:=Font.New("Arial:20:Italic,Bold")
Font.Draw("hey whats up",100,100,font1,green)
|
MOD EDIT: Had to fix up your sample code (typo on your variable) -Asok |
|
|
|
|
|
Pear-i
|
Posted: Sat Apr 12, 2003 9:19 am Post subject: (No subject) |
|
|
oops sorry about that, had to go out right after i posted the message
like for variables.. say I have a variable for X which is a integer,
and i want to format it like the usual Font.Draw thing
the problem is that the Font.Draw command only sees to take Strings,
and not integers, so when i put hte variable in it gives me an error of 'wrong type'..
just wondering if theres a way to change the interger variable into a string variable or a way to format the integer variable on display. |
|
|
|
|
|
Blade
|
Posted: Sat Apr 12, 2003 10:42 am Post subject: (No subject) |
|
|
use intstr() .. it converts integers to strings so you can use it in desperate times like these.. as an example:
code: | var font1:int:=Font.New("Arial:30:Italic,Bold")
Font.Draw(intstr(x),100,100,font1,black) |
|
|
|
|
|
|
|
|