Use SDL 2 instead of SDL 1.2
This commit is contained in:
parent
4432a80a3c
commit
f478761e07
13 changed files with 404 additions and 540 deletions
|
@ -441,11 +441,19 @@ void Field_KeyDownEvent( field_t *edit, int key ) {
|
|||
switch ( key ) {
|
||||
case K_DEL:
|
||||
if ( edit->cursor < len ) {
|
||||
memmove( edit->buffer + edit->cursor,
|
||||
memmove( edit->buffer + edit->cursor,
|
||||
edit->buffer + edit->cursor + 1, len - edit->cursor );
|
||||
}
|
||||
break;
|
||||
|
||||
case K_BACKSPACE:
|
||||
if ( edit->cursor > 0 ) {
|
||||
memmove( edit->buffer + edit->cursor - 1,
|
||||
edit->buffer + edit->cursor, len + 1 - edit->cursor );
|
||||
edit->cursor--;
|
||||
}
|
||||
break;
|
||||
|
||||
case K_RIGHTARROW:
|
||||
if ( edit->cursor < len ) {
|
||||
edit->cursor++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue