| 460 | |
| 461 | |
| 462 | Point GetTileZoomCenterWindow(bool in, Window * w) |
| 463 | { |
| 464 | int x, y; |
| 465 | const Viewport &vp = *w->viewport; |
| 466 | |
| 467 | if (in) { |
| 468 | x = ((_cursor.pos.x - vp.left) >> 1) + (vp.width >> 2); |
| 469 | y = ((_cursor.pos.y - vp.top) >> 1) + (vp.height >> 2); |
| 470 | } else { |
| 471 | x = vp.width - (_cursor.pos.x - vp.left); |
| 472 | y = vp.height - (_cursor.pos.y - vp.top); |
| 473 | } |
| 474 | /* Get the tile below the cursor and center on the zoomed-out center */ |
| 475 | return GetTileFromScreenXY(_cursor.pos.x, _cursor.pos.y, x + vp.left, y + vp.top); |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * Update the status of the zoom-buttons according to the zoom-level |
no test coverage detected