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

Username:   Password: 
 RegisterRegister   
 Using Font.Draw to draw integers
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hamid14




PostPosted: Thu Nov 05, 2009 6:16 pm   Post subject: Using Font.Draw to draw integers

I am using Turing 4.1. My problem is that I want to be able to draw integers using font.draw command. But I am not able to, because it comes up with errors. I've tried putting in the variable name, didn't work, and tried putting the variable in with brackets, that didn't work either. Any help? I just need a way to be able to draw integers that have a variable. Here's the code

var font1 : int := Font.New("Garamond:12:bold")
var health : int := 30

Font.Draw(health,0,0,font)
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Thu Nov 05, 2009 6:30 pm   Post subject: RE:Using Font.Draw to draw integers

You need to use the command intstr (int). This will turn your int into a string that can be outputted with Font.Draw.

Turing:
Font.Draw (intstr (health), 0, 0, font, black)
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  [ 2 Posts ]
Jump to:   


Style:  
Search: