Use SDL 2 instead of SDL 1.2

This commit is contained in:
Tim Angus 2013-01-17 13:31:30 +00:00
parent 4432a80a3c
commit f478761e07
13 changed files with 404 additions and 540 deletions

View file

@ -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++;