Merge remote-tracking branch 'origin/master'
commit
bcd896ed45
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -34,6 +34,10 @@ public class GameFrame extends JFrame{
|
|||
}
|
||||
this.add(game);
|
||||
this.setTitle("GUI is cool!"); //set title for frame
|
||||
// set game icon and ignore exception (failing to set icon doesn't otherwise break program)
|
||||
try {
|
||||
this.setIconImage(GamePanel.getImage("img/misc/favicon.png"));
|
||||
} catch (IOException ignored) {}
|
||||
this.setResizable(false); //frame can't change size
|
||||
this.setBackground(Color.white);
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //X button will stop program execution
|
||||
|
|
|
@ -191,7 +191,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener{
|
|||
return ImageIO.read(new File(imageLocation));
|
||||
}
|
||||
|
||||
public BufferedImage flipImageHorizontally(BufferedImage originalImage) {
|
||||
public static BufferedImage flipImageHorizontally(BufferedImage originalImage) {
|
||||
BufferedImage flippedImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
for (int x = 0; x < originalImage.getWidth(); x++) {
|
||||
for (int y = 0; y < originalImage.getHeight(); y++) {
|
||||
|
|
Loading…
Reference in New Issue