login hintergrund

master
leventius imperatus 2020-06-07 22:11:07 +02:00
parent 963c537de6
commit 75f9b0cab3
4 changed files with 33 additions and 13 deletions

BIN
assets/hintergrund.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

1
bin/.gitignore vendored
View File

@ -1,3 +1,4 @@
/MapMenu$1.class
/MapMenu.class
/Portal.class
/Hintergrund.class

19
src/Hintergrund.java Normal file
View File

@ -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");
}
}

View File

@ -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<Object>(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);
}