equal
deleted
inserted
replaced
13 #include "window_gui.h" |
13 #include "window_gui.h" |
14 #include "strings_func.h" |
14 #include "strings_func.h" |
15 #include "date_func.h" |
15 #include "date_func.h" |
16 #include "viewport_func.h" |
16 #include "viewport_func.h" |
17 #include "gfx_func.h" |
17 #include "gfx_func.h" |
|
18 #include "gui.h" |
18 |
19 |
19 #include "table/strings.h" |
20 #include "table/strings.h" |
20 |
21 |
21 static void HandleSubsidyClick(int y) |
22 static void HandleSubsidyClick(int y) |
22 { |
23 { |
64 xy = GetTown(offs)->xy; |
65 xy = GetTown(offs)->xy; |
65 } else { |
66 } else { |
66 xy = GetIndustry(offs)->xy; |
67 xy = GetIndustry(offs)->xy; |
67 } |
68 } |
68 |
69 |
69 if (!ScrollMainWindowToTile(xy)) { |
70 if (_ctrl_pressed || !ScrollMainWindowToTile(xy)) { |
|
71 if (_ctrl_pressed) ShowExtraViewPortWindow(xy); |
|
72 |
70 /* otherwise determine to coordinate for subsidy and scroll to it */ |
73 /* otherwise determine to coordinate for subsidy and scroll to it */ |
71 offs = s->to; |
74 offs = s->to; |
72 if (s->age >= 12) { |
75 if (s->age >= 12) { |
73 xy = GetStation(offs)->xy; |
76 xy = GetStation(offs)->xy; |
74 } else if (te == TE_PASSENGERS || te == TE_MAIL || te == TE_GOODS || te == TE_FOOD) { |
77 } else if (te == TE_PASSENGERS || te == TE_MAIL || te == TE_GOODS || te == TE_FOOD) { |
75 xy = GetTown(offs)->xy; |
78 xy = GetTown(offs)->xy; |
76 } else { |
79 } else { |
77 xy = GetIndustry(offs)->xy; |
80 xy = GetIndustry(offs)->xy; |
78 } |
81 } |
79 ScrollMainWindowToTile(xy); |
82 |
|
83 if (_ctrl_pressed) { |
|
84 ShowExtraViewPortWindow(xy); |
|
85 } else { |
|
86 ScrollMainWindowToTile(xy); |
|
87 } |
80 } |
88 } |
81 } |
89 } |
82 |
90 |
83 static void DrawSubsidiesWindow(const Window *w) |
91 static void DrawSubsidiesWindow(const Window *w) |
84 { |
92 { |