Changeset - r13331:641d6b3f3840
[Not reviewed]
master
0 4 0
rubidium - 15 years ago 2009-10-24 09:47:02
rubidium@openttd.org
(svn r17850) -Codechange: remove most usage of delta on OnResize
4 files changed with 4 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1172,10 +1172,7 @@ struct BuildVehicleWindow : Window {
 

	
 
	virtual void OnResize(Point delta)
 
	{
 
		if (delta.x != 0 && !this->listview_mode) {
 
			ResizeButtons(this, BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_RENAME);
 
		}
 
		if (delta.y == 0) return;
 
		if (!this->listview_mode) ResizeButtons(this, BUILD_VEHICLE_WIDGET_BUILD, BUILD_VEHICLE_WIDGET_RENAME);
 

	
 
		this->vscroll.SetCapacity((this->widget[BUILD_VEHICLE_WIDGET_LIST].bottom - this->widget[BUILD_VEHICLE_WIDGET_LIST].top + 1) / GetVehicleListHeight(this->vehicle_type));
 
		this->widget[BUILD_VEHICLE_WIDGET_LIST].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
src/smallmap_gui.cpp
Show inline comments
 
@@ -1135,7 +1135,7 @@ public:
 

	
 
	virtual void OnResize(Point delta)
 
	{
 
		if (delta.x != 0 && this->map_type == SMT_INDUSTRY) this->ResizeLegend();
 
		if (this->map_type == SMT_INDUSTRY) this->ResizeLegend();
 
	}
 

	
 
	void SmallMapCenterOnCurrentPos()
src/station_gui.cpp
Show inline comments
 
@@ -1051,7 +1051,7 @@ struct StationViewWindow : public Window
 

	
 
	virtual void OnResize(Point delta)
 
	{
 
		if (delta.x != 0) ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
 
		ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
 
		this->vscroll.SetCapacity((this->widget[SVW_WAITING].bottom - this->widget[SVW_WAITING].top + 1) / this->resize.step_height);
 
	}
 
};
src/vehicle_gui.cpp
Show inline comments
 
@@ -1498,8 +1498,7 @@ struct VehicleDetailsWindow : Window {
 

	
 
	virtual void OnResize(Point delta)
 
	{
 
		if (delta.x != 0) ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
 
		if (delta.y == 0) return;
 
		ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
 

	
 
		this->vscroll.SetCapacity((this->widget[VLD_WIDGET_MIDDLE_DETAILS].bottom - this->widget[VLD_WIDGET_MIDDLE_DETAILS].top + 1) / 14);
 
		this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
0 comments (0 inline, 0 general)