summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-05-05 11:36:43 +0000
committerpeter1138 <peter1138@openttd.org>2008-05-05 11:36:43 +0000
commit78c0929b18e508f3f18728dc55e760470308d796 (patch)
tree2b03bcb1a0888d81488cf0ab912ed5a356863cee /src/station_gui.cpp
parent7e70d9f09f8f8c29357372883a6788e7668e92c7 (diff)
downloadopenttd-78c0929b18e508f3f18728dc55e760470308d796.tar.xz
(svn r12953) -Feature: Open a new viewport when ctrl-clicking on a 'Location' button, a town/station/industry list, or some news items.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 64e993e30..c1345e5c1 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -422,7 +422,12 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
const Station *st = sl->sort_list[id_v];
/* do not check HasStationInUse - it is slow and may be invalid */
assert(st->owner == owner || (st->owner == OWNER_NONE && !st->IsBuoy()));
- ScrollMainWindowToTile(st->xy);
+
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(st->xy);
+ } else {
+ ScrollMainWindowToTile(st->xy);
+ }
break;
}
@@ -936,7 +941,11 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
break;
case SVW_LOCATION:
- ScrollMainWindowToTile(GetStation(w->window_number)->xy);
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(GetStation(w->window_number)->xy);
+ } else {
+ ScrollMainWindowToTile(GetStation(w->window_number)->xy);
+ }
break;
case SVW_RATINGS: