summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.c12
-rw-r--r--src/main.c2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/interface.c b/src/interface.c
index 3ef7ed2..7f7ec65 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -150,15 +150,17 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
int x0=(XRES-192)/2,y0=(YRES-80)/2,b=1,bq;
ui_edit ed;
+ // if currently moving a sign, stop doing so
+ if (MSIGN!=-1)
+ {
+ MSIGN = -1;
+ return;
+ }
+
// check if it is an existing sign
for (i=0; i<MAXSIGNS; i++)
if (signs[i].text[0])
{
- if (i == MSIGN)
- {
- MSIGN = -1;
- return;
- }
get_sign_pos(i, &x, &y, &w, &h);
if (mx>=x && mx<=x+w && my>=y && my<=y+h)
break;
diff --git a/src/main.c b/src/main.c
index 4e60674..683cd96 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2305,7 +2305,7 @@ int main(int argc, char *argv[])
}
}
- if (c==WL_SIGN+100)
+ if (c==WL_SIGN+100 || MSIGN!=-1) // if sign tool is selected or a sign is being moved
{
if (!bq)
add_sign_ui(vid_buf, x, y);