font help
Author |
Message |
skier
|
Posted: Wed Nov 03, 2004 5:04 pm Post subject: font help |
|
|
alright im trying to make this work grow until it gets to size 50. heres what i have so far but i dont work, any help?
code: |
setscreen ("graphics: 600,450,offscreenonly")
var font1 : int
var big : int
big := 10
Draw.FillBox (0, 0, 600, 450, 7)
loop
font1 := Font.New ("Snap ITC", : big)
big := big + 1
Draw.Text ("PACMAN", 200, 300, font1, 12)
Time.Delay (10)
View.Update
end loop
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mazer
|
Posted: Wed Nov 03, 2004 5:26 pm Post subject: (No subject) |
|
|
Change the line to:
code: | font1 := Font.New ("Snap ITC :" + intstr (big)) |
But remember that you haven't made any checks to make it stop after 50. Also, you should call Font.Free on your font somewhere at the end of the loop. |
|
|
|
|
|
skier
|
Posted: Wed Nov 03, 2004 5:33 pm Post subject: (No subject) |
|
|
but hten the work becomesun readable |
|
|
|
|
|
Mazer
|
Posted: Wed Nov 03, 2004 5:39 pm Post subject: (No subject) |
|
|
So clear the screen.
|
|
|
|
|
|
skier
|
Posted: Wed Nov 03, 2004 5:44 pm Post subject: (No subject) |
|
|
ill bet that i look really dumb, dont i |
|
|
|
|
|
skier
|
Posted: Wed Nov 03, 2004 5:54 pm Post subject: (No subject) |
|
|
quick question;
what does "intstr" actually do? |
|
|
|
|
|
Mazer
|
Posted: Wed Nov 03, 2004 6:21 pm Post subject: (No subject) |
|
|
Don't worry, I've seen dumber.
intstr is a function that takes an integer as an input and returns a string.
An example:
code: | put intstr(8008135) |
Takes the integer 8008135 and returns the string "8008135".
If you want to know what a function/procedure does, just type it into the turing editor and hit F8 to see what parameters it takes and what it's output type is (see status bar), or hit F9 to open the turing reference with more in depth information about it. |
|
|
|
|
|
skier
|
Posted: Wed Nov 03, 2004 6:30 pm Post subject: (No subject) |
|
|
thanks for the help |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|