summaryrefslogtreecommitdiff
path: root/src/news_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
commit4595d2c3b12490c74b4bd6ff245429b7c418d515 (patch)
tree2b03bcb1a0888d81488cf0ab912ed5a356863cee /src/news_gui.cpp
parent57e104f97edb5e3f60d7bab515bb9c97eb21e132 (diff)
downloadopenttd-4595d2c3b12490c74b4bd6ff245429b7c418d515.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/news_gui.cpp')
-rw-r--r--src/news_gui.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index f92c9ffc9..92f0ecf12 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -206,8 +206,15 @@ static void NewsWindowProc(Window *w, WindowEvent *e)
Vehicle *v = GetVehicle(ni->data_a);
ScrollMainWindowTo(v->x_pos, v->y_pos);
} else if (ni->flags & NF_TILE) {
- if (!ScrollMainWindowToTile(ni->data_a) && ni->data_b != 0) {
- ScrollMainWindowToTile(ni->data_b);
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(ni->data_a);
+ if (ni->data_b != 0) {
+ ShowExtraViewPortWindow(ni->data_b);
+ }
+ } else {
+ if (!ScrollMainWindowToTile(ni->data_a) && ni->data_b != 0) {
+ ScrollMainWindowToTile(ni->data_b);
+ }
}
}
break;