about summary refs log tree commit diff stats
path: root/src/com
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2012-06-03 16:04:08 -0400
committerStarla Insigna <hatkirby@fourisland.com>2012-06-03 16:04:08 -0400
commitcee9549fea2f1b9f9aaa67268ec738395752d4e4 (patch)
treea5f7997561ea51e748dd1138e078e05869500f8b /src/com
parentd40dec9d9916e97ffdc2cf58c2f937c958b409f6 (diff)
downloadfrigidearth-cee9549fea2f1b9f9aaa67268ec738395752d4e4.tar.gz
frigidearth-cee9549fea2f1b9f9aaa67268ec738395752d4e4.tar.bz2
frigidearth-cee9549fea2f1b9f9aaa67268ec738395752d4e4.zip
Made screen initially smaller
This is adorable. It also now factors in the window inset at the top, so goodbye annoying letterbox edges.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/fourisland/frigidearth/Main.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/fourisland/frigidearth/Main.java b/src/com/fourisland/frigidearth/Main.java index 89ed192..7ded79f 100644 --- a/src/com/fourisland/frigidearth/Main.java +++ b/src/com/fourisland/frigidearth/Main.java
@@ -46,7 +46,7 @@ public class Main extends Canvas
46 46
47 mainWindow = new JFrame(); 47 mainWindow = new JFrame();
48 mainWindow.setTitle("Frigid Earth"); 48 mainWindow.setTitle("Frigid Earth");
49 mainWindow.setSize(CANVAS_WIDTH*2, CANVAS_HEIGHT*2); 49 mainWindow.setSize(CANVAS_WIDTH, CANVAS_HEIGHT);
50 mainWindow.setLocation(GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().x-CANVAS_WIDTH, GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().y-CANVAS_HEIGHT); 50 mainWindow.setLocation(GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().x-CANVAS_WIDTH, GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().y-CANVAS_HEIGHT);
51 mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 51 mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
52 mainWindow.addKeyListener(new KeyListener() { 52 mainWindow.addKeyListener(new KeyListener() {
@@ -71,6 +71,7 @@ public class Main extends Canvas
71 }); 71 });
72 mainWindow.add(gameCanvas); 72 mainWindow.add(gameCanvas);
73 mainWindow.setVisible(true); 73 mainWindow.setVisible(true);
74 mainWindow.setSize(CANVAS_WIDTH, CANVAS_HEIGHT+mainWindow.getInsets().top);
74 75
75 gameCanvas.createBufferStrategy(2); 76 gameCanvas.createBufferStrategy(2);
76 77