Browse Source

create game screen

master
Yazan Alaamer 2 years ago
parent
commit
d71484174b
  1. 8
      src/main/java/game/StartDarkSoulsGame.java

8
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();
}
}
}
Loading…
Cancel
Save