From cee9549fea2f1b9f9aaa67268ec738395752d4e4 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 3 Jun 2012 16:04:08 -0400 Subject: Made screen initially smaller This is adorable. It also now factors in the window inset at the top, so goodbye annoying letterbox edges. --- src/com/fourisland/frigidearth/Main.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/fourisland') 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 mainWindow = new JFrame(); mainWindow.setTitle("Frigid Earth"); - mainWindow.setSize(CANVAS_WIDTH*2, CANVAS_HEIGHT*2); + mainWindow.setSize(CANVAS_WIDTH, CANVAS_HEIGHT); mainWindow.setLocation(GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().x-CANVAS_WIDTH, GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint().y-CANVAS_HEIGHT); mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mainWindow.addKeyListener(new KeyListener() { @@ -71,6 +71,7 @@ public class Main extends Canvas }); mainWindow.add(gameCanvas); mainWindow.setVisible(true); + mainWindow.setSize(CANVAS_WIDTH, CANVAS_HEIGHT+mainWindow.getInsets().top); gameCanvas.createBufferStrategy(2); -- cgit 1.4.1