diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-06-14 14:13:27 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-06-14 14:13:27 (GMT) |
| commit | 2dd04b917ddc2016099a716e67c50b462e393237 (patch) | |
| tree | ff05f5ccaafd1f89c5808b0007769dde85274e56 /src/interface.c | |
| parent | 14abcf5fc29a2be10ae8de2e5d5711daf0aea7a5 (diff) | |
| download | powder-2dd04b917ddc2016099a716e67c50b462e393237.zip powder-2dd04b917ddc2016099a716e67c50b462e393237.tar.gz | |
Add access to the local saving features
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/interface.c b/src/interface.c index 9f34144..8aaa111 100644 --- a/src/interface.c +++ b/src/interface.c @@ -617,13 +617,19 @@ void ui_richtext_process(int mx, int my, int mb, int mbq, ui_richtext *ed) } } -void draw_svf_ui(pixel *vid_buf)// all the buttons at the bottom +void draw_svf_ui(pixel *vid_buf, int alternate)// all the buttons at the bottom { int c; //the open browser button - drawtext(vid_buf, 4, YRES+(MENUSIZE-14), "\x81", 255, 255, 255, 255); - drawrect(vid_buf, 1, YRES+(MENUSIZE-16), 16, 14, 255, 255, 255, 255); + if(alternate) + { + fillrect(vid_buf, 0, YRES+(MENUSIZE-16)-1, 18, 16, 255, 255, 255, 255); + drawtext(vid_buf, 4, YRES+(MENUSIZE-14), "\x81", 0, 0, 0, 255); + } else { + drawtext(vid_buf, 4, YRES+(MENUSIZE-14), "\x81", 255, 255, 255, 255); + drawrect(vid_buf, 1, YRES+(MENUSIZE-16), 16, 14, 255, 255, 255, 255); + } // the reload button c = svf_open ? 255 : 128; @@ -631,15 +637,22 @@ void draw_svf_ui(pixel *vid_buf)// all the buttons at the bottom drawrect(vid_buf, 19, YRES+(MENUSIZE-16), 16, 14, c, c, c, 255); // the save sim button - c = svf_login ? 255 : 128; - drawtext(vid_buf, 40, YRES+(MENUSIZE-14), "\x82", c, c, c, 255); - if (svf_open) - drawtextmax(vid_buf, 58, YRES+(MENUSIZE-12), 125, svf_name, c, c, c, 255); - else - drawtext(vid_buf, 58, YRES+(MENUSIZE-12), "[untitled simulation]", c, c, c, 255); - drawrect(vid_buf, 37, YRES+(MENUSIZE-16), 150, 14, c, c, c, 255); - if (svf_open && svf_own) - drawdots(vid_buf, 55, YRES+(MENUSIZE-15), 12, c, c, c, 255); + if(alternate) + { + fillrect(vid_buf, 36, YRES+(MENUSIZE-16)-1, 152, 16, 255, 255, 255, 255); + drawtext(vid_buf, 40, YRES+(MENUSIZE-14), "\x82", 0, 0, 0, 255); + drawtext(vid_buf, 58, YRES+(MENUSIZE-12), "[save to disk]", 0, 0, 0, 255); + } else { + c = svf_login ? 255 : 128; + drawtext(vid_buf, 40, YRES+(MENUSIZE-14), "\x82", c, c, c, 255); + if (svf_open) + drawtextmax(vid_buf, 58, YRES+(MENUSIZE-12), 125, svf_name, c, c, c, 255); + else + drawtext(vid_buf, 58, YRES+(MENUSIZE-12), "[untitled simulation]", c, c, c, 255); + drawrect(vid_buf, 37, YRES+(MENUSIZE-16), 150, 14, c, c, c, 255); + if (svf_open && svf_own) + drawdots(vid_buf, 55, YRES+(MENUSIZE-15), 12, c, c, c, 255); + } c = (svf_login && svf_open) ? 255 : 128; @@ -700,7 +713,7 @@ void draw_svf_ui(pixel *vid_buf)// all the buttons at the bottom } else*/ { - drawtext(vid_buf, XRES-154+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xBD", 255, 255, 255, 255); //TODO: More suitable icon + drawtext(vid_buf, XRES-154+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xCF", 255, 255, 255, 255); drawrect(vid_buf, XRES-159+BARSIZE/*494*/, YRES+(MENUSIZE-16), 14, 14, 255, 255, 255, 255); } |
