mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 12:59:33 +00:00
(svn r14143) -Codechange: Recenter viewport of waypoint window when relocating the waypoint.
This commit is contained in:
parent
857df41a6d
commit
a813b6a854
@ -249,6 +249,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3
|
|||||||
|
|
||||||
RedrawWaypointSign(wp);
|
RedrawWaypointSign(wp);
|
||||||
wp->xy = tile;
|
wp->xy = tile;
|
||||||
|
InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
const StationSpec* statspec;
|
const StationSpec* statspec;
|
||||||
|
@ -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)
|
virtual void OnQueryTextFinished(char *str)
|
||||||
{
|
{
|
||||||
if (!StrEmpty(str)) {
|
if (!StrEmpty(str)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user