Computer Science Canada Font Draw |
Author: | Joe Keller [ Fri Jan 20, 2012 8:39 pm ] | ||
Post subject: | Font Draw | ||
What is it you are trying to achieve? I want to draw the font with the product number (im making the price is right game), i will be like Product 1 then show it, and so on Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
|
Author: | Alex C. [ Fri Jan 20, 2012 8:59 pm ] |
Post subject: | RE:Font Draw |
well your produc tnumber is an int, and Font.Draw can only accept string and char types of variable... look into your holtsoft doc to find the convert "int to string" command |
Author: | Joe Keller [ Fri Jan 20, 2012 9:02 pm ] |
Post subject: | RE:Font Draw |
Is there any other way of doing it than this specific code? so i can write a number i can alter aswell as text |
Author: | Alex C. [ Fri Jan 20, 2012 9:09 pm ] |
Post subject: | RE:Font Draw |
mmmmm.... im not sure |
Author: | Dreadnought [ Sat Jan 21, 2012 12:38 am ] | ||
Post subject: | Re: Font Draw | ||
I think Joe Keller wrote: Is there any other way of doing it than this specific code? so i can write a number i can alter aswell as text
I think you want to have both text and a variable together in the string you draw. This is very easy once you convert the integer (product) into a string. You just do regular string concatenation.
I'm gonna stick with Alex C.'s idea of not telling you the name of the function to convert an integer into a string, but I'll give you hint, it starts with "int" (just the letters not the quotation marks). Good luck. |
Author: | copthesaint [ Sat Jan 21, 2012 10:03 am ] | ||||||
Post subject: | RE:Font Draw | ||||||
This results int to string
this results string to int
this results real to string
|
Author: | Alex C. [ Sat Jan 21, 2012 2:30 pm ] |
Post subject: | RE:Font Draw |
@Dreadnought Hey! i actually forgot that function! your soul shall burn forever!!! just kidding! lol |