Computer Science Canada

Displaying Variable on Screen with Draw.Text Issues

Author:  sh0td0wn [ Tue Jan 15, 2008 4:20 pm ]
Post subject:  Displaying Variable on Screen with Draw.Text Issues

OK, I'm trying to display a variable that has a number in a Draw.Text or Font.Draw.

Is it possible?

Author:  Clayton [ Tue Jan 15, 2008 4:30 pm ]
Post subject:  RE:Displaying Variable on Screen with Draw.Text Issues

Yes.

Author:  StealthArcher [ Tue Jan 15, 2008 5:03 pm ]
Post subject:  RE:Displaying Variable on Screen with Draw.Text Issues

Check out intstr in the documentation.

Author:  sh0td0wn [ Tue Jan 15, 2008 10:51 pm ]
Post subject:  Re: Displaying Variable on Screen with Draw.Text Issues

I want to display it on top of a graphic.

Author:  StealthArcher [ Tue Jan 15, 2008 10:54 pm ]
Post subject:  Re: Displaying Variable on Screen with Draw.Text Issues

Follow this general program flow:


code:

var yournumber:int:= *some number*
var yournewnumber:string
draw your graphic
declare your font
yournewnumber:=intstr(yournumber)
Font.Draw(yournewnumber,yourfont,somewhere over your graphic)

Author:  Tony [ Tue Jan 15, 2008 10:55 pm ]
Post subject:  RE:Displaying Variable on Screen with Draw.Text Issues

Background shouldn't make a difference.

Author:  StealthArcher [ Tue Jan 15, 2008 10:56 pm ]
Post subject:  Re: Displaying Variable on Screen with Draw.Text Issues

True, it shouldn't, but he asked so...

Author:  sh0td0wn [ Tue Jan 15, 2008 11:24 pm ]
Post subject:  Re: Displaying Variable on Screen with Draw.Text Issues

I'm kinda new to this stuff so thanks for the help.


: