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
Sponsor Sponsor
DemonWasp
Posted: Sun May 02, 2010 3:39 am Post subject: 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
Posted: Sun May 02, 2010 6:42 am Post subject: 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
Posted: Sun May 02, 2010 11:03 am Post subject: RE:Draw.Text and Get command
loop
char letter
string name
get letter
name:=name+letter
end loop
TheGuardian001
Posted: Sun May 02, 2010 4:30 pm Post subject: Re: RE:Draw.Text and Get command
r.m_spy @ Sun May 02, 2010 11:03 am wrote:
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
would be a more effective solution, since it will get the name character by character, instead of all at once.