summaryrefslogtreecommitdiff
path: root/src/industry_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/industry_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/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 9df7ac4b5..29714963a 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -568,7 +568,11 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
} break;
case IVW_GOTO:
i = GetIndustry(w->window_number);
- ScrollMainWindowToTile(i->xy + TileDiffXY(1, 1));
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(i->xy + TileDiffXY(1, 1));
+ } else {
+ ScrollMainWindowToTile(i->xy + TileDiffXY(1, 1));
+ }
} break;
}
@@ -853,7 +857,11 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e)
if (!IsInsideMM(y, 0, w->vscroll.cap)) return;
p = y + w->vscroll.pos;
if (p < _num_industry_sort) {
- ScrollMainWindowToTile(_industry_sort[p]->xy);
+ if (_ctrl_pressed) {
+ ShowExtraViewPortWindow(_industry_sort[p]->xy);
+ } else {
+ ScrollMainWindowToTile(_industry_sort[p]->xy);
+ }
}
} break;
}