* Show a new Extra Viewport window. * Center it on the tile under the cursor, if the cursor is inside a viewport. * If that fails, center it on main viewport center. */
| 172 | * If that fails, center it on main viewport center. |
| 173 | */ |
| 174 | void ShowExtraViewportWindowForTileUnderCursor() |
| 175 | { |
| 176 | /* Use tile under mouse as center for new viewport. |
| 177 | * Do this before creating the window, it might appear just below the mouse. */ |
| 178 | Point pt = GetTileBelowCursor(); |
| 179 | ShowExtraViewportWindow(pt.x != -1 ? TileVirtXY(pt.x, pt.y) : INVALID_TILE); |
| 180 | } |
no test coverage detected