From 4595d2c3b12490c74b4bd6ff245429b7c418d515 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/subsidy_gui.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/subsidy_gui.cpp') diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index 93b19530b..9d54fc563 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -15,6 +15,7 @@ #include "date_func.h" #include "viewport_func.h" #include "gfx_func.h" +#include "gui.h" #include "table/strings.h" @@ -66,7 +67,9 @@ handle_click: xy = GetIndustry(offs)->xy; } - if (!ScrollMainWindowToTile(xy)) { + if (_ctrl_pressed || !ScrollMainWindowToTile(xy)) { + if (_ctrl_pressed) ShowExtraViewPortWindow(xy); + /* otherwise determine to coordinate for subsidy and scroll to it */ offs = s->to; if (s->age >= 12) { @@ -76,7 +79,12 @@ handle_click: } else { xy = GetIndustry(offs)->xy; } - ScrollMainWindowToTile(xy); + + if (_ctrl_pressed) { + ShowExtraViewPortWindow(xy); + } else { + ScrollMainWindowToTile(xy); + } } } -- cgit v1.2.3-54-g00ecf