(svn r12953) -Feature: Open a new viewport when ctrl-clicking on a 'Location' button, a town/station/industry list, or some news items.

This commit is contained in:
2008-05-05 11:36:43 +00:00
parent 57e104f97e
commit 4595d2c3b1
9 changed files with 79 additions and 24 deletions

View File

@@ -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);
}
}
}