Add stage icon

This commit is contained in:
Katchan 2021-12-09 12:46:40 +01:00
parent 2670acc775
commit 17e63aa826
2 changed files with 4 additions and 0 deletions

View File

@ -82,4 +82,7 @@ public class Cell extends Rectangle {
return sp; return sp;
} }
public static Image getPlayerImage() {
return PLAYER_IMAGE;
}
} }

View File

@ -47,6 +47,7 @@ public class Window extends AbstractView {
Scene scene = new Scene(createContent()); Scene scene = new Scene(createContent());
stage.setScene(scene); stage.setScene(scene);
stage.setTitle("Game"); stage.setTitle("Game");
stage.getIcons().add(Cell.getPlayerImage());
stage.setResizable(false); stage.setResizable(false);
stage.sizeToScene(); stage.sizeToScene();
stage.show(); stage.show();