Changeset - r15738:dbce3ee1f4e5
[Not reviewed]
master
0 2 0
alberth - 14 years ago 2010-08-08 11:21:24
alberth@openttd.org
(svn r20415) -Add: Clicking at the smallmap disables updates from the industry chain window.
2 files changed with 15 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/industry_gui.cpp
Show inline comments
 
@@ -2281,11 +2281,21 @@ struct IndustryCargoesWindow : public Wi
 
	}
 

	
 
	/**
 
	 * Notify the window to display another industry type.
 
	 * @param data The new industry type to display.
 
	 * Notify the window about external events.
 
	 * - data = 0 .. NUM_INDUSTRYTYPES - 1: Display the chain around the given industry.
 
	 * - data = NUM_INDUSTRYTYPES: Stop sending updates to the smallmap window.
 
	 * @param data The event.
 
	 */
 
	virtual void OnInvalidateData(int data)
 
	{
 
		if (data == NUM_INDUSTRYTYPES) {
 
			if (this->IsWidgetLowered(ICW_NOTIFY)) {
 
				this->RaiseWidget(ICW_NOTIFY);
 
				this->SetWidgetDirty(ICW_NOTIFY);
 
			}
 
			return;
 
		}
 

	
 
		assert(data >= 0 && data < NUM_INDUSTRYTYPES);
 
		this->ComputeIndustryDisplay(data);
 
	}
src/smallmap_gui.cpp
Show inline comments
 
@@ -1154,6 +1154,9 @@ public:
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		/* User clicked something, notify the industry chain window to stop sending newly selected industries. */
 
		InvalidateWindowClassesData(WC_INDUSTRY_CARGOES, NUM_INDUSTRYTYPES);
 

	
 
		switch (widget) {
 
			case SM_WIDGET_MAP: { // Map window
 
				/*
0 comments (0 inline, 0 general)