summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorPhil <cracker642@gmail.com>2010-09-08 23:43:06 (GMT)
committer Phil <cracker642@gmail.com>2010-09-09 00:25:19 (GMT)
commit8e3383909b0301c14eee2b7f3473c4df095d77e0 (patch)
treee8924c71afe42900bf201362f35665c99f44ff7c /interface.c
parentd28edfa6a9932b479efa36cdb9448354081c09ab (diff)
downloadpowder-8e3383909b0301c14eee2b7f3473c4df095d77e0.zip
powder-8e3383909b0301c14eee2b7f3473c4df095d77e0.tar.gz
Added specific element erase, right click on element in menu, then right click on eraser, the one to be erased will have a light blue box around it. works for walls too.
changed some wall code because it looks like someone just put random numbers in. fixed a wall bug
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/interface.c b/interface.c
index f6ef749..5162928 100644
--- a/interface.c
+++ b/interface.c
@@ -1291,7 +1291,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
else if(n==*sr)
{
drawrect(vid_buf, x+30, y-1, 29, 17, 0, 0, 255, 255);
- }
+ }
}
}
for(n = 0; n<PT_NUM; n++)
@@ -1400,7 +1400,7 @@ void menu_ui(pixel *vid_buf, int i, int *sl, int *sr)
//drawtext(vid_buf, XRES+2, (12*i)+2, msections[i].icon, 255, 255, 255, 255);
}
-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 *psr,int b, int bq, int mx, int my)
{
int h,x,y,n=0,height,width,sy,rows=0;
mx /= sdl_scale;
@@ -1437,6 +1437,10 @@ 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, 0, 0, 255, 255);
}
+ else if(n==*psr)
+ {
+ drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
+ }
}
}
}
@@ -1465,6 +1469,10 @@ 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, 0, 0, 255, 255);
}
+ else if(n==*psr)
+ {
+ drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
+ }
}
}
for(n = 0; n<PT_NUM; n++)
@@ -1490,6 +1498,10 @@ 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, 0, 0, 255, 255);
}
+ else if(n==*psr)
+ {
+ drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
+ }
}
}
}
@@ -1518,6 +1530,10 @@ 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, 0, 0, 255, 255);
}
+ else if(n==*psr)
+ {
+ drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255);
+ }
}
}
}
@@ -1541,6 +1557,8 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx,
}
if(b==4&&h!=-1)
{
+ PSR = *sr;
+ *psr = *sr;
*sr = h;
}
}