(svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp.

This commit is contained in:
rubidium
2008-05-17 13:01:30 +00:00
parent a89b5721a8
commit ad6e52080c
16 changed files with 61 additions and 30 deletions

View File

@@ -2171,3 +2171,12 @@ void DrawVehicleImage(const Vehicle *v, int x, int y, VehicleID selection, int c
default: NOT_REACHED();
}
}
void StopGlobalFollowVehicle(const Vehicle *v)
{
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
if (w != NULL && w->viewport->follow_vehicle == v->index) {
ScrollMainWindowTo(v->x_pos, v->y_pos, true); // lock the main view on the vehicle's last position
w->viewport->follow_vehicle = INVALID_VEHICLE;
}
}