(svn r20414) -Feature: Enable industries in the smallmap displayed in the industry chain window.

This commit is contained in:
alberth
2010-08-08 11:17:14 +00:00
parent 7b3ee58d03
commit 15f407acea
3 changed files with 63 additions and 1 deletions

View File

@@ -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;