|
7 | 7 | #include "DrawPoint.h" |
8 | 8 | #include "gameTypes/MapCoordinates.h" |
9 | 9 | #include "gameTypes/MapTypes.h" |
| 10 | +#include <boost/signals2.hpp> |
10 | 11 | #include <vector> |
11 | 12 |
|
12 | 13 | class GameWorldBase; |
@@ -80,27 +81,18 @@ class GameWorldView |
80 | 81 | float GetCurrentTargetZoomFactor() const; |
81 | 82 | void SetNextZoomFactor(); |
82 | 83 |
|
83 | | - /// Bauqualitäten anzeigen oder nicht |
84 | | - void ToggleShowBQ() |
85 | | - { |
86 | | - show_bq = !show_bq; |
87 | | - SaveIngameSettingsValues(); |
88 | | - } |
89 | | - /// Gebäudenamen zeigen oder nicht |
90 | | - void ToggleShowNames() |
91 | | - { |
92 | | - show_names = !show_names; |
93 | | - SaveIngameSettingsValues(); |
94 | | - } |
95 | | - /// Produktivität zeigen oder nicht |
96 | | - void ToggleShowProductivity() |
97 | | - { |
98 | | - show_productivity = !show_productivity; |
99 | | - SaveIngameSettingsValues(); |
100 | | - }; |
101 | | - /// Schaltet Produktivitäten/Namen komplett aus oder an |
| 84 | + /// Show or hide construction aid |
| 85 | + void ToggleShowBQ(); |
| 86 | + /// Show or hide building names |
| 87 | + void ToggleShowNames(); |
| 88 | + /// Show or hide productivity |
| 89 | + void ToggleShowProductivity(); |
| 90 | + /// Toggle names and productivity completely on or off |
102 | 91 | void ToggleShowNamesAndProductivity(); |
103 | 92 |
|
| 93 | + /// Copy visibility of HUD elements from this view to another |
| 94 | + void CopyHudSettingsTo(GameWorldView& other, bool copyBQ) const; |
| 95 | + |
104 | 96 | void Draw(const RoadBuildState& rb, MapPoint selected, bool drawMouse, unsigned* water = nullptr); |
105 | 97 |
|
106 | 98 | /// Moves the map view by the given offset in pixels |
@@ -128,6 +120,9 @@ class GameWorldView |
128 | 120 |
|
129 | 121 | void Resize(const Extent& newSize); |
130 | 122 |
|
| 123 | + /// Triggered when visibility of HUD elements changes |
| 124 | + boost::signals2::signal<void()> onHudSettingsChanged; |
| 125 | + |
131 | 126 | private: |
132 | 127 | void CalcFxLx(); |
133 | 128 | void DrawBoundaryStone(const MapPoint& pt, DrawPoint pos, Visibility vis); |
|
0 commit comments