summaryrefslogtreecommitdiff
path: root/src/subsidy_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/subsidy_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/subsidy_gui.cpp')
-rw-r--r--src/subsidy_gui.cpp12
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);
+ }
}
}