Skip to content

Commit

Permalink
Renamed Window.java to Screen.java
Browse files Browse the repository at this point in the history
  • Loading branch information
svenar-nl committed Sep 28, 2016
1 parent 226cd1f commit c9055ee
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

import me.winspeednl.libz.core.GameCore;

public class Window {
public class Screen {

private JFrame frame;
private Canvas canvas;
private BufferedImage image;
private Graphics graphics;
private BufferStrategy bufferStrategy;

public Window(GameCore gc) {
public Screen(GameCore gc) {

canvas = new Canvas();

Expand All @@ -35,6 +35,7 @@ public Window(GameCore gc) {
gc.lockScreenSize();

image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);

canvas.setPreferredSize(size);
canvas.setMaximumSize(size);
canvas.setMaximumSize(size);
Expand All @@ -49,6 +50,8 @@ public Window(GameCore gc) {
canvas.setMaximumSize(size);
canvas.setMaximumSize(size);
canvas.setSize(size);

if (!gc.isDecorated()) frame.setUndecorated(true);
}

frame.setLayout(new BorderLayout());
Expand Down

0 comments on commit c9055ee

Please sign in to comment.