Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Displaying Variable on Screen with Draw.Text Issues
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sh0td0wn




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Clayton




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

Yes.
StealthArcher




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

Check out intstr in the documentation.
sh0td0wn




PostPosted: 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.
StealthArcher




PostPosted: 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)
Tony




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

Background shouldn't make a difference.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
StealthArcher




PostPosted: 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...
sh0td0wn




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: