[Freeciv-Dev] (PR#7284) bug when left-clicking on the overview
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7284) bug when left-clicking on the overview |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Tue, 20 Jan 2004 21:43:31 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7284 >
You can left-click on the overview to goto a unit.
But this doesn't work very well. For instance if the unit is in patrol
mode it breaks. If the unit has no hover state then things won't work
too well either.
The attached patch should fix this. It also makes any left-click on the
overview equivalent to a left-click on the mapview. A good thing, I think.
jason
Index: client/gui-gtk/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapctrl.c,v
retrieving revision 1.94
diff -u -r1.94 mapctrl.c
--- client/gui-gtk/mapctrl.c 2004/01/04 00:42:23 1.94
+++ client/gui-gtk/mapctrl.c 2004/01/21 05:42:17
@@ -368,7 +368,7 @@
if (can_client_change_view() && ev->button == 3) {
center_tile_mapcanvas(xtile, ytile);
} else if (can_client_issue_orders() && ev->button == 1) {
- do_unit_goto(xtile, ytile);
+ do_map_click(xtile, ytile, SELECT_POPUP);
}
return TRUE;
Index: client/gui-gtk-2.0/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapctrl.c,v
retrieving revision 1.36
diff -u -r1.36 mapctrl.c
--- client/gui-gtk-2.0/mapctrl.c 2004/01/04 00:42:24 1.36
+++ client/gui-gtk-2.0/mapctrl.c 2004/01/21 05:42:17
@@ -348,7 +348,7 @@
if (can_client_change_view() && (ev->button == 3)) {
center_tile_mapcanvas(xtile, ytile);
} else if (can_client_issue_orders() && (ev->button == 1)) {
- do_unit_goto(xtile, ytile);
+ do_map_click(xtile, ytile, SELECT_POPUP);
}
return TRUE;
Index: client/gui-xaw/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapctrl.c,v
retrieving revision 1.81
diff -u -r1.81 mapctrl.c
--- client/gui-xaw/mapctrl.c 2004/01/04 00:42:24 1.81
+++ client/gui-xaw/mapctrl.c 2004/01/21 05:42:17
@@ -290,7 +290,7 @@
overview_to_map_pos(&xtile, &ytile, event->xbutton.x, event->xbutton.y);
if(ev->button==Button1)
- do_unit_goto(xtile,ytile);
+ do_map_click(xtile, ytile, SELECT_POPUP);
else if(ev->button==Button3)
center_tile_mapcanvas(xtile, ytile);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#7284) bug when left-clicking on the overview,
Jason Short <=
|
|