diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-03-03 04:30:04 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-03-03 04:30:04 (GMT) |
| commit | 9e8b7440ba464f4f84c0058095f4546e1d4da9de (patch) | |
| tree | feca6c4dfe23cdd4dc34dc59c89ad5b602478041 /src/interface.c | |
| parent | 673f6d0f9bb794d2f773a26a889fe873a0808678 (diff) | |
| download | powder-9e8b7440ba464f4f84c0058095f4546e1d4da9de.zip powder-9e8b7440ba464f4f84c0058095f4546e1d4da9de.tar.gz | |
a get_pmap and get_prop function for python so fancier scripts can be made. Made a demo of increasing element type by one, import example, example.increment()
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c index 07355a4..d453a10 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3858,12 +3858,13 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) { ed.cursor = 0; //fillrect(vid_buf, -1, -1, XRES, 220, 0, 0, 0, 190); memcpy(old_buf,vid_buf,(XRES+BARSIZE)*YRES*PIXELSIZE); - fillrect(old_buf, -1, -1, XRES, 220, 0, 0, 0, 190); + fillrect(old_buf, -1, -1, XRES+1, 220, 0, 0, 0, 190); currentcommand2 = malloc(sizeof(command_history)); memset(currentcommand2, 0, sizeof(command_history)); currentcommand2->prev_command = last_command2; currentcommand2->command = mystrdup(error); last_command2 = currentcommand2; + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); cc = 0; while(cc < 80){ fillrect(old_buf, -1, -1+cc, XRES+BARSIZE, 2, 0, 0, 0, 160-(cc*2)); @@ -3945,12 +3946,14 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) { currentcommand->command = mystrdup(ed.str); last_command = currentcommand; free(old_buf); + SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL); return currentcommand->command; } if (sdl_key==SDLK_ESCAPE || sdl_key==SDLK_BACKQUOTE) { console_mode = 0; free(old_buf); + SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL); return NULL; } if(sdl_key==SDLK_UP || sdl_key==SDLK_DOWN) @@ -3987,6 +3990,7 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) { } console_mode = 0; free(old_buf); + SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL); return NULL; } |
