From 78c0929b18e508f3f18728dc55e760470308d796 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 5 May 2008 11:36:43 +0000 Subject: (svn r12953) -Feature: Open a new viewport when ctrl-clicking on a 'Location' button, a town/station/industry list, or some news items. --- src/industry_gui.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/industry_gui.cpp') 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; } -- cgit v1.2.3-54-g00ecf