diff options
author | peter1138 <peter1138@openttd.org> | 2008-05-05 11:36:43 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-05-05 11:36:43 +0000 |
commit | 4595d2c3b12490c74b4bd6ff245429b7c418d515 (patch) | |
tree | 2b03bcb1a0888d81488cf0ab912ed5a356863cee /src/subsidy_gui.cpp | |
parent | 57e104f97edb5e3f60d7bab515bb9c97eb21e132 (diff) | |
download | openttd-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/subsidy_gui.cpp')
-rw-r--r-- | src/subsidy_gui.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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); + } } } |