File diff r14398:461a80e5f996 → r14399:3f819c0da60a
src/industry_gui.cpp
Show inline comments
 
@@ -388,19 +388,13 @@ public:
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void OnDoubleClick(Point pt, int widget)
 
	{
 
		if (widget != DPIW_MATRIX_WIDGET) return;
 
		this->OnClick(pt, DPIW_FUND_WIDGET);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case DPIW_MATRIX_WIDGET: {
 
				const IndustrySpec *indsp;
 
				int y = (pt.y - this->GetWidget<NWidgetBase>(DPIW_MATRIX_WIDGET)->pos_y) / this->resize.step_height + this->vscroll.GetPosition();
 

	
 
@@ -416,12 +410,13 @@ public:
 
						/* Reset the button state if going to prospecting or "build many industries" */
 
						this->RaiseButtons();
 
						ResetObjectToPlace();
 
					}
 

	
 
					this->SetWidgetDisabledState(DPIW_FUND_WIDGET, !this->enabled[this->selected_index]);
 
					if (this->enabled[this->selected_index] && click_count > 1) this->OnClick(pt, DPIW_FUND_WIDGET, 1);
 
				}
 
			} break;
 

	
 
			case DPIW_FUND_WIDGET: {
 
				if (this->selected_type == INVALID_INDUSTRYTYPE) {
 
					this->HandleButtonClick(DPIW_FUND_WIDGET);
 
@@ -700,13 +695,13 @@ public:
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == IVW_INFO) size->height = this->info_height;
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		Industry *i;
 

	
 
		switch (widget) {
 
			case IVW_INFO: {
 
				i = Industry::Get(this->window_number);
 
@@ -1102,13 +1097,13 @@ public:
 
				break;
 
			}
 
		}
 
	}
 

	
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case IDW_DROPDOWN_ORDER:
 
				this->industries.ToggleSortOrder();
 
				this->SetDirty();
 
				break;