|
@ -12,7 +12,7 @@ import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
public class gui implements GuiInterface { |
|
|
public class gui implements GuiInterface { |
|
|
public static JFrame Frame; |
|
|
public static JFrame Frame; |
|
|
public static JButton StartBtn, CloseBtn; |
|
|
|
|
|
|
|
|
public static JButton StartBtn, CloseBtn, StartDarkSoulsBtn; |
|
|
public static JPanel Panel; |
|
|
public static JPanel Panel; |
|
|
public static JLabel Label; |
|
|
public static JLabel Label; |
|
|
public static int width = 800, height = 600; |
|
|
public static int width = 800, height = 600; |
|
@ -37,6 +37,8 @@ public class gui implements GuiInterface { |
|
|
public void createButtons() { |
|
|
public void createButtons() { |
|
|
StartBtn = new JButton("Starte Spiel"); |
|
|
StartBtn = new JButton("Starte Spiel"); |
|
|
StartBtn.addActionListener(new StartGameGui()); |
|
|
StartBtn.addActionListener(new StartGameGui()); |
|
|
|
|
|
StartDarkSoulsBtn = new JButton("Starte Dark Souls 4"); |
|
|
|
|
|
StartDarkSoulsBtn.addActionListener(new StartGameGui()); |
|
|
CloseBtn = new JButton("Schliessen"); |
|
|
CloseBtn = new JButton("Schliessen"); |
|
|
CloseBtn.addActionListener(new ActionHandler()); |
|
|
CloseBtn.addActionListener(new ActionHandler()); |
|
|
|
|
|
|
|
@ -58,6 +60,7 @@ public class gui implements GuiInterface { |
|
|
Label.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
Label.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
Panel.add(Label, gbc); |
|
|
Panel.add(Label, gbc); |
|
|
Panel.add(StartBtn, gbc); |
|
|
Panel.add(StartBtn, gbc); |
|
|
|
|
|
Panel.add(StartDarkSoulsBtn, gbc); |
|
|
Panel.add(CloseBtn, gbc); |
|
|
Panel.add(CloseBtn, gbc); |
|
|
Frame.add(Panel); |
|
|
Frame.add(Panel); |
|
|
Frame.setVisible(true); |
|
|
Frame.setVisible(true); |
|
|