File diff r11518:6c02f3322c23 → r11519:80d5a7e0eeb8
src/station_gui.cpp
Show inline comments
 
@@ -537,25 +537,25 @@ public:
 
		if (this->stations.NeedResort()) {
 
			DEBUG(misc, 3, "Periodic rebuild station list company %d", this->window_number);
 
			this->SetDirty();
 
		}
 
	}
 

	
 
	virtual void OnTimeout()
 
	{
 
		this->RaiseWidget(SLW_SORTBY);
 
		this->SetDirty();
 
	}
 

	
 
	virtual void OnResize(Point new_size, Point delta)
 
	virtual void OnResize(Point delta)
 
	{
 
		this->vscroll.cap += delta.y / 10;
 
	}
 

	
 
	virtual void OnInvalidateData(int data)
 
	{
 
		if (data == 0) {
 
			this->stations.ForceRebuild();
 
		} else {
 
			this->stations.ForceResort();
 
		}
 
	}
 
@@ -966,25 +966,25 @@ struct StationViewWindow : public Window
 
				break;
 
			}
 
		}
 
	}
 

	
 
	virtual void OnQueryTextFinished(char *str)
 
	{
 
		if (str == NULL) return;
 

	
 
		DoCommandP(0, this->window_number, 0, CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION), NULL, str);
 
	}
 

	
 
	virtual void OnResize(Point new_size, Point delta)
 
	virtual void OnResize(Point delta)
 
	{
 
		if (delta.x != 0) ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
 
		this->vscroll.cap += delta.y / (int)this->resize.step_height;
 
	}
 
};
 

	
 

	
 
static const WindowDesc _station_view_desc(
 
	WDP_AUTO, WDP_AUTO, 249, 110, 249, 110,
 
	WC_STATION_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	_station_view_widgets
 
@@ -1178,25 +1178,25 @@ struct SelectStationWindow : Window {
 
		/* Close Window; this might cause double frees! */
 
		DeleteWindowById(WC_SELECT_STATION, 0);
 
	}
 

	
 
	virtual void OnTick()
 
	{
 
		if (_thd.dirty & 2) {
 
			_thd.dirty &= ~2;
 
			this->SetDirty();
 
		}
 
	}
 

	
 
	virtual void OnResize(Point new_size, Point delta)
 
	virtual void OnResize(Point delta)
 
	{
 
		this->vscroll.cap = (this->widget[JSW_PANEL].bottom - this->widget[JSW_PANEL].top) / 10;
 
	}
 

	
 
	virtual void OnInvalidateData(int data)
 
	{
 
		FindStationsNearby(this->tile, this->size_x, this->size_y, true);
 
		this->SetDirty();
 
	}
 
};
 

	
 
static const WindowDesc _select_station_desc(