diff options
| author | Lieuwe <lieuwemo@gmail.com> | 2011-02-26 10:49:23 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-03-02 20:54:19 (GMT) |
| commit | 364759ff0812a8049b2f3ca249a34a57fa2e4325 (patch) | |
| tree | 0c83dc67f47ff9a6b8d4177e282744f8572af14a /src/interface.c | |
| parent | 647ff2bff073d525f1c02eea5c4e01e8dcd3f279 (diff) | |
| download | powder-364759ff0812a8049b2f3ca249a34a57fa2e4325.zip powder-364759ff0812a8049b2f3ca249a34a57fa2e4325.tar.gz | |
python console
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/interface.c b/src/interface.c index b13917d..9be3e6d 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3847,7 +3847,7 @@ struct command_history { }; typedef struct command_history command_history; command_history *last_command = NULL; -char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show previous commands +char *console_ui(pixel *vid_buf,char error[255],char console_more) { int mx,my,b,cc,ci = -1; pixel *old_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE); command_history *currentcommand; @@ -3879,8 +3879,7 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show memcpy(vid_buf,old_buf,(XRES+BARSIZE)*YRES*PIXELSIZE); draw_line(vid_buf, 0, 219, XRES+BARSIZE-1, 219, 228, 228, 228, XRES+BARSIZE); - drawtext(vid_buf, 15, 15, "Welcome to The Powder Toy console v.3 (by cracker64)\n" - "Current commands are quit, set, reset, load, create, file, kill, sound\n" //TODO: help command + drawtext(vid_buf, 15, 15, "Welcome to The Powder Toy console v.3 (by cracker64, python by Doxin)" //TODO: help command ,255, 255, 255, 255); cc = 0; @@ -3908,8 +3907,10 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show if(error && ed.str[0]=='\0') drawtext(vid_buf, 20, 207, error, 255, 127, 127, 200); - - drawtext(vid_buf, 5, 207, ">", 255, 255, 255, 240); + if(console_more==0) + drawtext(vid_buf, 5, 207, ">", 255, 255, 255, 240); + else + drawtext(vid_buf, 5, 207, "...", 255, 255, 255, 240); ui_edit_draw(vid_buf, &ed); ui_edit_process(mx, my, b, &ed); |
