back space
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
RageCage

I was playing around in zonker's little text entering demo and in the demo he has released, if you backspace it deletes the whole line of text. I doubt this was his intention so I decided to see if I could fix it. I did, but only to find out that backspace acts weird in verge.

basicly:
===================================

switch(lastpressed){
case SCAN_BACKSP: s=left(s, (len(s)-1));
case SCAN_CTRL: s=left(s, (len(s)-1));
}

key[lastpressed]=0;
lastpressed=0;

===================================
and the result is you can press backspace once and, untill you press another key, you cant do another backspace. ctrl on the otherhand works fine.

Posted on 2004-04-17 03:00:45

el_desconocido

Seems to work fine for me. Look at [input.vc in] Sullied Chronicles (shameless plug:) if you'd like, but my switch, although larger looks much like that.
{

[snip]
switch(lastpressed)
{
[snip]
case SCAN_BACKSP:
if(len(char_buffer)) char_buffer = Left(char_buffer, len(char_buffer) - 1);
input_lbuffer = "";
[snip]
}
last_lastpressed = lastpressed;
lastpressed = 0;
next_repeat = timer + INITIAL_DELAY;
if(len(char_buffer) < 256) char_buffer = char_buffer + input_lbuffer;
}


??

Posted on 2004-04-17 06:44:13 (last edited on 2004-04-17 07:04:15)


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.