What to do:
On zoom, panelGame is supposed to keep track of the tile in the middle.
Currently, the code for zooming in/out causes panelGame to jump around in a weird way.
Removing this would cause panelGame to keep track of the tile in the upper-left corner.
public void zoomIn()
{
if (zoomLevel < 8)
{
for(int i =0; i < (panelGame.getWidth() / panelGame.getTileSize() / 4); i++)
{
moveRight();
moveDown();
}
changeZoom(+1);
}
}
public void zoomOut()
{
if (zoomLevel > 1)
{
changeZoom(-1);
for(int i =0; i < (panelGame.getWidth() / panelGame.getTileSize() / 4); i++)
{
System.out.println(i);
moveLeft();
moveUp();
}
}
}
What to do: On zoom,
panelGame
is supposed to keep track of the tile in the middle.Currently, the code for zooming in/out causes
panelGame
to jump around in a weird way. Removing this would causepanelGame
to keep track of the tile in the upper-left corner.