diff options
author | rubidium <rubidium@openttd.org> | 2013-05-19 14:36:35 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-05-19 14:36:35 +0000 |
commit | 163dfdd34afe8020a207b8f0a1b58e29ce082c41 (patch) | |
tree | 0c66cb30bfd88dedb007b50fe4e51e9bc9cc5c6a /src/smallmap_gui.h | |
parent | 5bca50c466777cd134fb506efe4d8867d4b357f1 (diff) | |
download | openttd-163dfdd34afe8020a207b8f0a1b58e29ce082c41.tar.xz |
(svn r25262) -Feature: linkgraph overlay for smallmap
Diffstat (limited to 'src/smallmap_gui.h')
-rw-r--r-- | src/smallmap_gui.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h index e35a51c66..c54db27be 100644 --- a/src/smallmap_gui.h +++ b/src/smallmap_gui.h @@ -16,8 +16,12 @@ #include "window_gui.h" #include "strings_func.h" #include "blitter/factory.hpp" +#include "linkgraph/linkgraph_gui.h" #include "widgets/smallmap_widget.h" +/* set up the cargos to be displayed in the smallmap's route legend */ +void BuildLinkStatsLegend(); + void BuildIndustriesLegend(); void ShowSmallMap(); void BuildLandLegend(); @@ -43,6 +47,7 @@ protected: SMT_CONTOUR, SMT_VEHICLES, SMT_INDUSTRY, + SMT_LINKSTATS, SMT_ROUTES, SMT_VEGETATION, SMT_OWNER, @@ -73,6 +78,7 @@ protected: int zoom; ///< Zoom level. Bigger number means more zoom-out (further away). uint8 refresh; ///< Refresh counter, zeroed every FORCE_REFRESH_PERIOD ticks. + LinkGraphOverlay *overlay; Point SmallmapRemapCoords(int x, int y) const; @@ -144,6 +150,7 @@ protected: Point PixelToTile(int px, int py, int *sub, bool add_sub = true) const; Point ComputeScroll(int tx, int ty, int x, int y, int *sub); void SetZoomLevel(ZoomLevelChange change, const Point *zoom_pt); + void SetOverlayCargoMask(); void SetupWidgetData(); uint32 GetTileColours(const TileArea &ta) const; @@ -153,7 +160,10 @@ public: friend class NWidgetSmallmapDisplay; SmallMapWindow(const WindowDesc *desc, int window_number); + virtual ~SmallMapWindow() { delete this->overlay; } + void SmallMapCenterOnCurrentPos(); + Point GetStationMiddle(const Station *st) const; virtual void SetStringParameters(int widget) const; virtual void OnInit(); |