Use SDL 2 instead of SDL 1.2
This commit is contained in:
1 parent
4432a80a3c
commit
f478761e07
13 files changed
+404
-540
No files matched your search
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user