Skip to content

Commit 6ff3d6d

Browse files
committed
Fixed a bug with screen size with some platforms
On Windows, this looked fine. On others, it was cut off for some reason. Found a way to make it look good on all platforms.
1 parent b70b939 commit 6ff3d6d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'idea'
55
}
66

7-
version = 'LD'
7+
version = 'LD-Fix1'
88
archivesBaseName = 'BoxExplorer'
99

1010
jar {

src/main/java/com/github/jmatcj/ld43/LDJam43.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void init() throws Exception {
3939
@Override
4040
public void start(Stage primaryStage) {
4141
Canvas canvas = new Canvas(SCREEN_WIDTH, SCREEN_HEIGHT);
42-
Scene scene = new Scene(new Group(canvas), SCREEN_WIDTH - 10, SCREEN_HEIGHT - 10);
42+
Scene scene = new Scene(new Group(canvas));
4343
primaryStage.setScene(scene);
4444
GraphicsContext gc = canvas.getGraphicsContext2D();
4545

@@ -73,6 +73,7 @@ public void handle(long now) {
7373
gameLoop.start();
7474

7575
primaryStage.setResizable(false);
76+
primaryStage.sizeToScene();
7677
primaryStage.setTitle("Box Explorer");
7778
primaryStage.show();
7879

0 commit comments

Comments
 (0)