summaryrefslogtreecommitdiff
path: root/src/town_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/town_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/town_gui.cpp')
-rw-r--r--src/town_gui.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 64767290e..3937e9917 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -333,7 +333,11 @@ static void TownViewWndProc(Window *w, WindowEvent *e)
case WE_CLICK:
switch (e->we.click.widget) {
case TVW_CENTERVIEW: /* scroll to location */
- ScrollMainWindowToTile(t->xy);
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(t->xy);
+ } else {
+ ScrollMainWindowToTile(t->xy);
+ }
break;
case TVW_SHOWAUTORITY: /* town authority */
@@ -541,7 +545,11 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e)
t = _town_sort[id_v];
assert(t->xy);
- ScrollMainWindowToTile(t->xy);
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(t->xy);
+ } else {
+ ScrollMainWindowToTile(t->xy);
+ }
} break;
}
break;