diff options
| author | Philip <philip@philip-linuxlaptop.(none)> | 2010-10-28 23:31:06 (GMT) |
|---|---|---|
| committer | Philip <philip@philip-linuxlaptop.(none)> | 2010-10-28 23:31:06 (GMT) |
| commit | bb3b1a52ac2e5ad935640558f312c767a8ad9f15 (patch) | |
| tree | 2f663dfa8e4aa3201abae1c07a32e4d661c0482b /src/interface.c | |
| parent | bff5961d602531b224821da54a874a09f1dba317 (diff) | |
| download | powder-bb3b1a52ac2e5ad935640558f312c767a8ad9f15.zip powder-bb3b1a52ac2e5ad935640558f312c767a8ad9f15.tar.gz | |
added specific element eraser again for my own uses sinces everyone else thinks its useless. alt-click to pick and then alt-click in the game to erase the picked element. you could then have right and left click be two different elements and alt-click on the eraser to keep two elements selected and an easy to use eraser as well
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c index 4ab7bf4..2c66645 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1484,6 +1484,15 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); h = n; } + if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT))) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + h = n; + } + else if(n==SLALT) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + } else if(n==*sl) { drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); @@ -1509,6 +1518,15 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); h = n; } + if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT))) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + h = n; + } + else if(n==SLALT) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + } else if(n==*sl) { drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); @@ -1537,6 +1555,15 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); h = n; } + if(!bq && mx>=x+32 && mx<x+58 && my>=y && my< y+15&&(sdl_mod & (KMOD_LALT))) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + h = n; + } + else if(n==SLALT) + { + drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); + } else if(n==*sl) { drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); @@ -1564,11 +1591,23 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, if(b==1&&h!=-1) { - *sl = h; + if(sdl_mod & (KMOD_LALT)) + { + SLALT = h; + } + else{ + *sl = h; + } } if(b==4&&h!=-1) { - *sr = h; + if(sdl_mod & (KMOD_LALT)) + { + SLALT = h; + } + else{ + *sr = h; + } } } |
