diff --git a/assets/hintergrund.png b/assets/hintergrund.png new file mode 100644 index 0000000..a39149a Binary files /dev/null and b/assets/hintergrund.png differ diff --git a/bin/.gitignore b/bin/.gitignore index 67fc30e..b596533 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,4 @@ /MapMenu$1.class /MapMenu.class /Portal.class +/Hintergrund.class diff --git a/src/Hintergrund.java b/src/Hintergrund.java new file mode 100644 index 0000000..78fd6aa --- /dev/null +++ b/src/Hintergrund.java @@ -0,0 +1,19 @@ +// Diese Klasse stellt die einzelnen Bicks (Wände) auf der Map dar. + +public class Hintergrund extends Picture { + + + + private static final long serialVersionUID = -8813034369041822237L; + public int xPos; + public int yPos; + + public Hintergrund() { + + super("hintergrund"); + + + } + +} + diff --git a/src/MapMenu.java b/src/MapMenu.java index fb43125..350ab5b 100644 --- a/src/MapMenu.java +++ b/src/MapMenu.java @@ -2,7 +2,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.sql.SQLException; - +import javax.imageio.ImageIO; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; @@ -11,16 +11,13 @@ import javax.swing.JPanel; import javax.swing.JTextField; public class MapMenu extends JFrame { - - /** - * - */ + private static final long serialVersionUID = 2863784680171430142L; public boolean rdy; JButton button; - + Hintergrund hintergrund; JPanel panel; JComboBox bob; @@ -34,13 +31,11 @@ public class MapMenu extends JFrame { String selectedMap; public MapMenu() { - - super("Map Menu"); System.setProperty("sun.java2d.opengl", "true"); - + path = new File("assets/maps"); maps = path.list(); @@ -59,8 +54,13 @@ public class MapMenu extends JFrame { this.setContentPane(panel); this.getContentPane().setLayout(null); + hintergrund = new Hintergrund(); + panel.add(hintergrund); + hintergrund.setBounds(0, 0, 300, 200); + button = new JButton("Launch"); panel.add(button); + button.setBounds(70, 50, 120, 30); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { @@ -71,22 +71,22 @@ public class MapMenu extends JFrame { } } }); - + bob = new JComboBox(maps); bob.setSelectedItem("Original"); panel.add(bob); bob.setBounds(70, 10, 120, 30); } - + public String getSelectedMap() { return selectedMap; } // Was passieren soll, wenn der Button gedrückt wird - public void button_ActionPerformed(ActionEvent evt) throws SQLException { + public void button_ActionPerformed(ActionEvent evt) { selectedMap = String.valueOf(bob.getSelectedItem()); - + rdy = true; this.setVisible(false); }