Font with Variable
Author |
Message |
D4rkM4g3
|
Posted: Thu May 18, 2006 10:06 pm Post subject: Font with Variable |
|
|
I have to create a digital clock for a class. I've got it all working, with a counter counting up the seconds and so forth (that's how we have to do it =\) . The problem is we're supposed to have the time output in a bigger font. I know how to create font and change them, but turing won't let me put a variable into it...
code: |
Font.Draw (txtStr : string, x, y, fontID, Color : int)
|
Rather than having a text string, I want to be able to put my counter variable in there... Any ideas? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
TheOneTrueGod
![](http://www.drmcninja.com/images/mcninjab3.jpg)
|
Posted: Fri May 19, 2006 6:39 am Post subject: (No subject) |
|
|
well, your trying to put an integer parameter where theres a string parameter. You'll need to convert your input with:
intstr(number)
If you want to have more than one word (say, for example, to input ":" as well), you'll need to concatenate strings using the "+" operator. |
|
|
|
|
![](images/spacer.gif) |
D4rkM4g3
|
Posted: Fri May 19, 2006 6:59 am Post subject: (No subject) |
|
|
intstr(number) won't let me use a variable either...what I'd need to do is have it be:
but that doesn't do it either |
|
|
|
|
![](images/spacer.gif) |
HellblazerX
![](http://www.plamania.co.kr/shopimages/plmtest/2910040000213.jpg)
|
Posted: Fri May 19, 2006 10:24 am Post subject: (No subject) |
|
|
Well, of course that won't work. First of all, you spelt it wrong. It's "intstr", not "instr". Secondly, intstr only takes in one parameter, you're putting three. If you going to do it like that, then you could do it like this:
code: | intstr (seconds) + ",6,2" |
|
|
|
|
|
![](images/spacer.gif) |
D4rkM4g3
|
Posted: Fri May 19, 2006 4:13 pm Post subject: (No subject) |
|
|
Typo, calm down. The help file in turing said it has three:
code: | intstr ( i : int [ , width : int [ , base : int ] ] ) : string
|
Anyway, I got it working. |
|
|
|
|
![](images/spacer.gif) |
|
|