Computer Science Canada

using Font.Draw

Author:  bvbjules13 [ Mon Dec 10, 2012 5:33 pm ]
Post subject:  using Font.Draw

i was wondering if i can have my variable have the value of a the string and then a variable, i will show you what i mean, but basically this is for Font.Draw b/c i am trying to use Font.Draw in my program rather then using put (reason being the put statement wont allow me to show my graphics that is drawn before the words that i have showing up)

is it possible to enter in the value like shown below into my variable? i need to have it like that b/c the score will keep changing, and i need to input that message into Font.Draw, if not do you know of a possible way?

Turing:


var score : int := 100
var scoreMessage : string := "Score: ", score
Font.Draw (scoreMessage, 30, 30, font4, 43)



Please specify what version of Turing you are using
4.1

Author:  Insectoid [ Mon Dec 10, 2012 5:43 pm ]
Post subject:  RE:using Font.Draw

You're gonna want to use the intstr() command. It converts an integer value to a string.

ex.
code:
Font.Draw (intstr(5), 30, 30, font4, 43)

Author:  bvbjules13 [ Mon Dec 10, 2012 6:42 pm ]
Post subject:  Re: using Font.Draw

OMG thank u!


: