Changeset - r9986:70a888f9bda9
[Not reviewed]
master
0 2 0
frosch - 16 years ago 2008-08-23 16:34:05
frosch@openttd.org
(svn r14143) -Codechange: Recenter viewport of waypoint window when relocating the waypoint.
2 files changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/waypoint.cpp
Show inline comments
 
@@ -249,6 +249,7 @@ CommandCost CmdBuildTrainWaypoint(TileIn
 

	
 
			RedrawWaypointSign(wp);
 
			wp->xy = tile;
 
			InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
 
		}
 

	
 
		const StationSpec* statspec;
src/waypoint_gui.cpp
Show inline comments
 
@@ -77,6 +77,13 @@ public:
 
		}
 
	}
 

	
 
	virtual void OnInvalidateData(int data)
 
	{
 
		int x = TileX(this->wp->xy) * TILE_SIZE;
 
		int y = TileY(this->wp->xy) * TILE_SIZE;
 
		ScrollWindowTo(x,y, this);
 
	}
 

	
 
	virtual void OnQueryTextFinished(char *str)
 
	{
 
		if (!StrEmpty(str)) {
0 comments (0 inline, 0 general)