Font.Draw help
Author |
Message |
Piro24
|
Posted: Wed Dec 20, 2006 10:32 pm Post subject: Font.Draw help |
|
|
Say I want to make my program display a name I got earlier in a nicer text
Ex.
code: | get name
Font.Draw (name, 12, 12, fontID, green) |
Is there a way I can draw this string that I got ? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Hackmaster
|
Posted: Wed Dec 20, 2006 10:36 pm Post subject: (No subject) |
|
|
Well... first you have to define a new font, using Font.New. then, you just use that in place of fontID as well. also... you might check the tutorial section...It really can be quite helpful, when it comes to stuff just like this! |
|
|
|
|
|
Piro24
|
Posted: Wed Dec 20, 2006 10:40 pm Post subject: (No subject) |
|
|
Ok, bad question
What I need to do is put something like :
Font.Draw ("Hello", name, 12, 12, fontID, green)
name being a string that I 'got' earlier |
|
|
|
|
|
ericfourfour
|
Posted: Wed Dec 20, 2006 10:46 pm Post subject: (No subject) |
|
|
Many programming languages have this useful feature called concatenation. It let's you combine two strings into one. To concatenate strings in Turing you simply use the + operator.
code: | var helloName : string := "Hello " + name + "." |
code: | Font.Draw ("Hello " + name + ".", 12, 12, fontID, green) |
|
|
|
|
|
|
Piro24
|
Posted: Wed Dec 20, 2006 10:53 pm Post subject: (No subject) |
|
|
Oh, easy solution. Thanks a lot. |
|
|
|
|
|
|
|