diff --git a/Applicatie/NewWorldPanel.java b/Applicatie/NewWorldPanel.java index 235e3ba..11b7d7e 100644 --- a/Applicatie/NewWorldPanel.java +++ b/Applicatie/NewWorldPanel.java @@ -23,7 +23,7 @@ import javax.swing.JTextField; @SuppressWarnings("serial") public class NewWorldPanel extends JFrame { - BufferedImage grass,sand,selectedImage; + BufferedImage grass,sand,grass2, sand2,stone, selectedImage; public NewWorldPanel(Panel topPanel) { super("New World"); @@ -32,13 +32,16 @@ public class NewWorldPanel extends JFrame { try { grass = ImageIO.read(new File("images/grassIcon.jpg")); - sand = ImageIO.read(new File("images/sand.jpg")); + sand = ImageIO.read(new File("images/sandIcon.jpg")); + grass2 = ImageIO.read(new File("images/grassIcon2.png")); + sand2 = ImageIO.read(new File("images/sandIcon2.jpg")); + stone = ImageIO.read(new File("images/stoneIcon.jpg")); selectedImage = grass; } catch(IOException e) { e.printStackTrace(); } - String[] terrains = {"Grass", "Sand"}; + String[] terrains = {"Grass", "Grass 2","Sand", "Sand 2", "Stone"}; JPanel mainPanel = new JPanel(new BorderLayout()); JButton button; JLabel label; @@ -88,8 +91,17 @@ public class NewWorldPanel extends JFrame { selectedImage = grass; break; case 1: + selectedImage = grass2; + break; + case 2: selectedImage = sand; break; + case 3: + selectedImage = sand2; + break; + case 4: + selectedImage = stone; + break; } imageLabel.setIcon(new ImageIcon(selectedImage)); } diff --git a/Applicatie/Panel.java b/Applicatie/Panel.java index 06003b6..8af8eb6 100644 --- a/Applicatie/Panel.java +++ b/Applicatie/Panel.java @@ -44,7 +44,7 @@ import Objects.Wall; public class Panel extends JPanel implements ActionListener { - BufferedImage grass, sand; + BufferedImage grass, grass2, sand, sand2, stone; BufferedImage background; BufferedImage podiumImage, toiletImage, entranceImage, pathImage, wallImage, foodImage, waypointImage; @@ -60,8 +60,8 @@ public class Panel extends JPanel implements ActionListener private DrawObject selectedObject; private String clickedOption = "drag"; private Path currentPath; - private int width = 1920; - private int height = 1080; + private static int width = 1920; + private static int height = 1080; Point2D cameraPoint = new Point2D.Double(getWidth() / 2, getHeight() / 2); float cameraScale = 1; @@ -107,7 +107,10 @@ public class Panel extends JPanel implements ActionListener try { grass = ImageIO.read(new File("images/grass.jpg")); + grass2 = ImageIO.read(new File("images/grass2.png")); sand = ImageIO.read(new File("images/sand.jpg")); + sand2 = ImageIO.read(new File("images/sand2.jpg")); + stone = ImageIO.read(new File("images/stone.jpg")); podiumImage = ImageIO.read(new File("images/stageIcon.png")); toiletImage = ImageIO.read(new File("images/wcIcon.png")); entranceImage = ImageIO.read(new File("images/entranceIcon.png")); @@ -571,12 +574,12 @@ public class Panel extends JPanel implements ActionListener this.agenda = agenda; } - public int getFieldWidth() + public static int getFieldWidth() { return width; } - public int getFieldHeight() + public static int getFieldHeight() { return height; } @@ -626,12 +629,21 @@ public class Panel extends JPanel implements ActionListener cameraScale = 1; switch (terrainIndex) { - case 0: - background = grass; - break; - case 1: - background = sand; - break; + case 0: + background = grass; + break; + case 1: + background = grass2; + break; + case 2: + background = sand; + break; + case 3: + background = sand2; + break; + case 4: + background = stone; + break; } repaint(); } diff --git a/images/grass2.png b/images/grass2.png new file mode 100644 index 0000000..0633850 Binary files /dev/null and b/images/grass2.png differ diff --git a/images/grassIcon2.png b/images/grassIcon2.png new file mode 100644 index 0000000..e4eec71 Binary files /dev/null and b/images/grassIcon2.png differ diff --git a/images/path.jpg b/images/path.jpg deleted file mode 100644 index 9704f8d..0000000 Binary files a/images/path.jpg and /dev/null differ diff --git a/images/pathIcon.png b/images/pathIcon.png deleted file mode 100644 index 1b36611..0000000 Binary files a/images/pathIcon.png and /dev/null differ diff --git a/images/sand2.jpg b/images/sand2.jpg new file mode 100644 index 0000000..7aa02fd Binary files /dev/null and b/images/sand2.jpg differ diff --git a/images/sandIcon.jpg b/images/sandIcon.jpg new file mode 100644 index 0000000..94faf79 Binary files /dev/null and b/images/sandIcon.jpg differ diff --git a/images/sandIcon2.jpg b/images/sandIcon2.jpg new file mode 100644 index 0000000..dafa851 Binary files /dev/null and b/images/sandIcon2.jpg differ diff --git a/images/stone.jpg b/images/stone.jpg new file mode 100644 index 0000000..0667548 Binary files /dev/null and b/images/stone.jpg differ diff --git a/images/stoneIcon.jpg b/images/stoneIcon.jpg new file mode 100644 index 0000000..e232f89 Binary files /dev/null and b/images/stoneIcon.jpg differ