diff --git a/includes/defines.h b/includes/defines.h index 0f80ab69a..8ffa44941 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -90,7 +90,7 @@ extern int death; struct sign { - int x,y,ju; + int x,y,ju,m; char text[256]; }; typedef struct sign sign; diff --git a/includes/interface.h b/includes/interface.h index ddc260db0..b378a9944 100644 --- a/includes/interface.h +++ b/includes/interface.h @@ -153,6 +153,8 @@ void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); void add_sign_ui(pixel *vid_buf, int mx, int my); +void move_sign(pixel *vid_buf,int i); + void ui_edit_draw(pixel *vid_buf, ui_edit *ed); void ui_edit_process(int mx, int my, int mb, ui_edit *ed); diff --git a/src/graphics.c b/src/graphics.c index d6604a3e5..39f95953b 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2198,7 +2198,7 @@ void draw_parts(pixel *vid) void render_signs(pixel *vid_buf) { - int i, j, x, y, w, h, dx, dy; + int i, j, x, y, w, h, dx, dy,mx,my,b=1,bq; char buff[30]; //Buffer for(i=0; i=x && mx<=x+w && my>=y && my<=y+h) break; @@ -119,7 +124,6 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) } if(i >= MAXSIGNS) return; - if(nm) { signs[i].x = mx; @@ -165,6 +169,10 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) draw_icon(vid_buf, x0+68, y0+42, 0x9E, ju == 1); draw_icon(vid_buf, x0+86, y0+42, 0x9F, ju == 2); + drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255); + + + if(!nm) { drawtext(vid_buf, x0+138, y0+45, "\x86", 160, 48, 32, 255); @@ -187,6 +195,11 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) if(b && !bq && mx>=x0+86 && mx<=x0+103 && my>=y0+42 && my<=y0+59) ju = 2; + if(b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59) + { + signs[i].m = 1; + break; + } if(b && !bq && mx>=x0+9 && mx=y0+22 && my=x0 && mx=y0+64 && my<=y0+80)