diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 48221b5..568ad7f 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -22,6 +22,7 @@ public class StartDarkSoulsGame { Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28); JButton startButton; Container con; + TitelScreenHandler tsHandler= new TitelScreenHandler(); public StartDarkSoulsGame() { gui.Frame.setSize(800, 600); @@ -43,6 +44,7 @@ public class StartDarkSoulsGame { startButton = new JButton("START"); startButton.setBackground(Color.black); startButton.setForeground(Color.white); + startButton.addActionListener(tsHandler); titleNamePanel.add(titelNameLabel); StartButtonPanel.add(startButton); @@ -65,4 +67,10 @@ public class StartDarkSoulsGame { mainTextArea.setLineWrap(true); mainTextPanel.add(mainTextArea); } + public class TitelScreenHandler implements ActionListener{ + public void actionPerformed(ActionEvent event) { + createGameScreen(); + } + + } }