diff options
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r-- | src/smallmap_gui.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index af2cc1e6a..e73401c32 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1278,6 +1278,21 @@ public: } } + /** + * Notifications for the smallmap window. + * - data = 0: Displayed industries at the industry chain window have changed. + */ + virtual void OnInvalidateData(int data) + { + extern uint64 _displayed_industries; + if (this->map_type != SMT_INDUSTRY) this->SwitchMapType(SMT_INDUSTRY); + + for (int i = 0; i != _smallmap_industry_count; i++) { + _legend_from_industries[i].show_on_map = HasBit(_displayed_industries, _legend_from_industries[i].u.type); + } + this->SetDirty(); + } + virtual bool OnRightClick(Point pt, int widget) { if (widget != SM_WIDGET_MAP || _scrolling_viewport) return false; |