(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:
peter1138
2008-05-05 11:36:43 +00:00
parent 7e70d9f09f
commit 78c0929b18
9 changed files with 79 additions and 24 deletions

View File

@@ -333,7 +333,11 @@ static void TownViewWndProc(Window *w, WindowEvent *e)
case WE_CLICK:
switch (e->we.click.widget) {
case TVW_CENTERVIEW: /* scroll to location */
ScrollMainWindowToTile(t->xy);
if (_ctrl_pressed) {
ShowExtraViewPortWindow(t->xy);
} else {
ScrollMainWindowToTile(t->xy);
}
break;
case TVW_SHOWAUTORITY: /* town authority */
@@ -541,7 +545,11 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e)
t = _town_sort[id_v];
assert(t->xy);
ScrollMainWindowToTile(t->xy);
if (_ctrl_pressed) {
ShowExtraViewPortWindow(t->xy);
} else {
ScrollMainWindowToTile(t->xy);
}
} break;
}
break;