Changeset - r16303:9fce015471e1
[Not reviewed]
master
0 2 0
alberth - 14 years ago 2010-10-23 20:51:48
alberth@openttd.org
(svn r21021) -Add [FS#4171]: Center industry gui and waypoint gui after resize (partly by Krille).
2 files changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/industry_gui.cpp
Show inline comments
 
@@ -927,6 +927,8 @@ public:
 
		if (this->viewport != NULL) {
 
			NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(IVW_VIEWPORT);
 
			nvp->UpdateViewportCoordinates(this);
 

	
 
			ScrollWindowToTile(Industry::Get(this->window_number)->location.GetCenterTile(), this, true); // Re-center viewport.
 
		}
 
	}
 

	
src/waypoint_gui.cpp
Show inline comments
 
@@ -127,6 +127,8 @@ public:
 
			NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
 
			nvp->UpdateViewportCoordinates(this);
 
			this->wp->UpdateVirtCoord();
 

	
 
			ScrollWindowToTile(this->GetCenterTile(), this, true); // Re-center viewport.
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)