Compare commits

..

No commits in common. "393984343cb30a1a82dca39efa5fe0d48dd21592" and "c8528a6b588a5603a5268130fe0bcd2277d86a5e" have entirely different histories.

7 changed files with 14 additions and 18 deletions

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 959 B

View File

@ -1,13 +1,12 @@
public class HalloSchiffeVersenken {
public static void main(String[] args) throws InterruptedException {
//LUCAS CODE
MainMenuModel model = new MainMenuModel();
MainMenuView view = new MainMenuView();
MainMenuController controller = new MainMenuController(model, view);
//System.out.println("HelloSchiffeVersenekn");
/*Luccas Methoden
MainMenuModel model = new MainMenuModel();
MainMenuView view = new MainMenuView();
MainMenuController controller = new MainMenuController(model, view);
*/
System.out.println("HelloSchiffeVersenekn");
/*
System.out.println("sound");
@ -19,8 +18,6 @@ public class HalloSchiffeVersenken {
System.out.println("sound off");
SoundHandler.playSound("hit");
*/
//JOSHUA CODE
startLocalGame huso = new startLocalGame();
}
}

View File

@ -17,7 +17,7 @@ public class MainMenuController implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == view.getMultiButton()) {
view.closeWindow();
view.closeWindOw();
MultiMenuModel model = new MultiMenuModel();
MultiMenuView view = new MultiMenuView();
MultiMenuController controller2 = new MultiMenuController(model, view);

View File

@ -3,14 +3,13 @@ import javax.swing.JFrame;
import javax.swing.*;
public class MainMenuView {
ImageIcon SoundIcon = new ImageIcon("graphics/sound button.png");
ImageIcon SoundIcon = new ImageIcon("Grafik/sound button.png");
private JFrame frame = new JFrame();
private JLabel titelLabel = new JLabel("Studium versenken");
private JButton lokalButton = new JButton("Lokal");
private JButton multiButton= new JButton("Multiplayer");
private JButton soundButton = new JButton(SoundIcon);
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
public MainMenuView() {
buildFrame();
buildComponents();
@ -34,7 +33,7 @@ public class MainMenuView {
frame.setSize(1500,1000);
frame.setVisible(true);
frame.getContentPane().setBackground( Color.decode("#98F5FF"));
JLabel backgroundLabel = new JLabel(new ImageIcon("graphics/mainmenubackground.png"));
JLabel backgroundLabel = new JLabel(new ImageIcon("Grafik/mainmenubackground.png"));
frame.setContentPane(backgroundLabel);
frame.add(titelLabel);
frame.add(lokalButton);
@ -44,7 +43,7 @@ public class MainMenuView {
}
public void toggleMute(){
ImageIcon MuteIcon = new ImageIcon("graphics/sound button muted.png");
ImageIcon MuteIcon = new ImageIcon("Grafik/sound button muted.png");
if(soundButton.getIcon()==SoundIcon) {
soundButton.setIcon(MuteIcon);
}else{
@ -52,7 +51,7 @@ public class MainMenuView {
}
}
public void closeWindow(){
public void closeWindOw(){
frame.dispose();
}
public JFrame getFrame() {

View File

@ -3,7 +3,7 @@ import javax.swing.JFrame;
import javax.swing.*;
public class MultiMenuView {
ImageIcon SoundIcon = new ImageIcon("graphics/sound button.png");
ImageIcon SoundIcon = new ImageIcon("Grafik/sound button.png");
private JFrame frame = new JFrame();
private JButton soundButton = new JButton(SoundIcon);
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
@ -24,14 +24,14 @@ public class MultiMenuView {
frame.setSize(1500,1000);
frame.setVisible(true);
frame.getContentPane().setBackground( Color.decode("#98F5FF"));
JLabel backgroundLabel = new JLabel(new ImageIcon("graphics/mainmenubackground.png"));
JLabel backgroundLabel = new JLabel(new ImageIcon("Grafik/mainmenubackground.png"));
frame.setContentPane(backgroundLabel);
frame.add(soundButton);
frame.setLocationRelativeTo(null);
}
public void toggleMute(){
ImageIcon MuteIcon = new ImageIcon("graphics/sound button muted.png");
ImageIcon MuteIcon = new ImageIcon("Grafik/sound button muted.png");
if(soundButton.getIcon()==SoundIcon) {
soundButton.setIcon(MuteIcon);
}else{