
-----------------------------------
blarg0123
Sat May 01, 2010 11:51 pm

Draw.Text and Get command
-----------------------------------
What is it you are trying to achieve?
Draw out the letters one by one as if the user was typing while he/she input a name into the program


What is the problem you are having?
No idea where to start


Describe what you have tried to solve this problem
Nothing so far...


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)



get name:*
Draw.Text (name, 100, 100, font1, brightblue) 



This code just draws out the variable after the user finishes typing the name and hits enter. What i want to do is to draw the letters while the user is typing

Please specify what version of Turing you are using
Newest version, forgot which though

-----------------------------------
DemonWasp
Sun May 02, 2010 3:39 am

RE:Draw.Text and Get command
-----------------------------------
Draw one letter at a time, using a separate command for each letter. Put a delay ( number-in-milliseconds ) between the calls to slow it down. If you want to be crafty, you could make a procedure to do this that takes the string to print, the location to print it, the font / colour to use, and the speed to print at.

-----------------------------------
BigBear
Sun May 02, 2010 6:42 am

RE:Draw.Text and Get command
-----------------------------------
use getch to get one character at a time then you might want to check if they enter Backspace and take the last letter entered off

and enter to finish

-----------------------------------
r.m_spy
Sun May 02, 2010 11:03 am

RE:Draw.Text and Get command
-----------------------------------
loop

char letter
string name

get letter
name:=name+letter
end loop

-----------------------------------
TheGuardian001
Sun May 02, 2010 4:30 pm

Re: RE:Draw.Text and Get command
-----------------------------------
loop

char letter
string name

get letter
name:=name+letter
end loop

Get won't work here, since get waits for a full line of input (until "enter" is hit), and blocks all other processing.

Something more along the lines of

[code]
if hasch then
   name += getchar()
end if
[/code]
would be a more effective solution, since it will get the name character by character, instead of all at once.
