mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 02:47:24 +07:00
World screen now corrects itself upon resizing
This commit is contained in:
parent
08735d8e99
commit
aef1c4d707
@ -654,5 +654,14 @@ public class WorldScreen extends CameraStageBaseScreen {
|
|||||||
scrollPane.updateVisualScroll();
|
scrollPane.updateVisualScroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resize(int width, int height) {
|
||||||
|
|
||||||
|
if(stage.getViewport().getScreenWidth()!=width || stage.getViewport().getScreenHeight()!=height) {
|
||||||
|
super.resize(width, height);
|
||||||
|
game.worldScreen = new WorldScreen(); // start over.
|
||||||
|
game.setWorldScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user