Font.Draw Problems!
Author |
Message |
hq78
|
Posted: Wed Jan 05, 2005 8:10 pm Post subject: Font.Draw Problems! |
|
|
var font1:int
var number:int:=15
The command Font.Draw (" ", x,y,font1,red)
why does it not let me use Font.Draw(number,x,y,font1,red)? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
SuperGenius
|
Posted: Wed Jan 05, 2005 8:23 pm Post subject: (No subject) |
|
|
i think that only a string can be used. so instead of:
code: |
Font.Draw(number,x,y,font1,red)
|
do this:
code: |
Font.Draw(intstr(number),x,y,font1,red)
|
|
|
|
|
|
|
hq78
|
Posted: Wed Jan 05, 2005 9:08 pm Post subject: (No subject) |
|
|
PRAISES TO YOU!!!! Thanks SOOOO MUCH!!! |
|
|
|
|
|
SuperGenius
|
Posted: Wed Jan 05, 2005 9:57 pm Post subject: (No subject) |
|
|
for something like this if you looked in the help it would say the syntax required, which includes the var type for each parameter. |
|
|
|
|
|
hq78
|
Posted: Thu Jan 06, 2005 4:20 pm Post subject: (No subject) |
|
|
i looked for hours on this site before i posted so i guess i must have missed it |
|
|
|
|
|
thaProfessor
|
Posted: Thu Jan 06, 2005 6:16 pm Post subject: (No subject) |
|
|
im a newbie to programming and i just wanted to know how to make the statement you put in Font.Draw turn different colors or if you can do that ... any help would be nice |
|
|
|
|
|
Cervantes
|
Posted: Thu Jan 06, 2005 6:38 pm Post subject: (No subject) |
|
|
You sure can do that. Check out the last parameter to the Font.Draw function:
The Turing Reference wrote:
Font.Draw (txtStr : string, x, y, fontID, Color : int)
So, just change the colour number. Or you could use the RGB module.
Let's take a look at a simple example:
code: |
var font1 := Font.New ("Times New Roman:16")
for i : 0 .. maxcolour %usually, maxcolour will return 255
Font.Draw ("Look, my colours are changing!", 10, 10, font1, i)
delay (10)
end for
|
|
|
|
|
|
|
thaProfessor
|
Posted: Thu Jan 06, 2005 7:02 pm Post subject: (No subject) |
|
|
thanks alot ... |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|