diff options
| author | Simon <simon@hardwired.org.uk> | 2011-04-17 19:34:54 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-04-17 19:34:54 (GMT) |
| commit | d37bd56eb645c2efce265941501a2ae5a2187315 (patch) | |
| tree | f50677a9f509a5fbcbe42e8249f1a22f9db7c596 /src/interface.c | |
| parent | 5c8a6f3af850196fe2299d81b936845fa687f566 (diff) | |
| download | powder-d37bd56eb645c2efce265941501a2ae5a2187315.zip powder-d37bd56eb645c2efce265941501a2ae5a2187315.tar.gz | |
'M' For selected element swap, 'dae' var for showing a selected element box upon element change (not implemented)
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/interface.c b/src/interface.c index fb23073..86d389b 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1701,7 +1701,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr) } */ //current menu function -void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, int my) +void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int *dae, int b, int bq, int mx, int my) { int h,x,y,n=0,height,width,sy,rows=0,xoff=0,fwidth; SEC = SEC2; @@ -1729,7 +1729,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-UI_WALLSTART].colour)+5; if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); h = n; } if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) @@ -1743,11 +1743,11 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else if (n==*sl) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); } else if (n==*sr) { - drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 55, 55, 255, 255); } } } @@ -1766,7 +1766,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-UI_WALLSTART].colour)+5; if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); h = n; } if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) @@ -1780,11 +1780,11 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else if (n==*sl) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); } else if (n==*sr) { - drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 55, 55, 255, 255); } } } @@ -1800,7 +1800,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, x -= draw_tool_xy(vid_buf, x, y, n, ptypes[n].pcolors)+5; if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); h = n; } if (!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) @@ -1814,11 +1814,11 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else if (n==*sl) { - drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 255, 55, 55, 255); } else if (n==*sr) { - drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255); + drawrect(vid_buf, x+30, y-1, 29, 17, 55, 55, 255, 255); } } } @@ -1836,7 +1836,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, x -= draw_tool_xy(vid_buf, x-xoff, y, n, ptypes[n].pcolors)+5; if (!bq && mx>=x+32-xoff && mx<x+58-xoff && my>=y && my< y+15) { - drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 255, 55, 55, 255); h = n; } if (!bq && mx>=x+32-xoff && mx<x+58-xoff && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) @@ -1850,11 +1850,11 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else if (n==*sl) { - drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 255, 0, 0, 255); + drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 255, 55, 55, 255); } else if (n==*sr) { - drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 0, 0, 255, 255); + drawrect(vid_buf, x+30-xoff, y-1, 29, 17, 55, 55, 255, 255); } } } @@ -1895,6 +1895,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else { *sl = h; + *dae = 51; } } if (b==4&&h==-1) @@ -1914,6 +1915,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } else { *sr = h; + *dae = 51; } } } |
