Minimale Anpassung an Actionlistener fuer MainMenu zu LocalGame
This commit is contained in:
parent
5bedfddc60
commit
d95df0cf5f
|
@ -2,9 +2,10 @@ public class HalloSchiffeVersenken {
|
||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
//LUCAS CODE
|
//LUCAS CODE
|
||||||
MainMenuModel model = new MainMenuModel();
|
coinToss ct = new coinToss();
|
||||||
MainMenuView view = new MainMenuView();
|
//MainMenuModel model = new MainMenuModel();
|
||||||
MainMenuController controller = new MainMenuController(model, view);
|
//MainMenuView view = new MainMenuView();
|
||||||
|
//MainMenuController controller = new MainMenuController(model, view);
|
||||||
|
|
||||||
|
|
||||||
//System.out.println("HelloSchiffeVersenekn");
|
//System.out.println("HelloSchiffeVersenekn");
|
||||||
|
@ -21,7 +22,7 @@ public class HalloSchiffeVersenken {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//JOSHUA CODE
|
//JOSHUA CODE
|
||||||
startLocalGame localTest = new startLocalGame();
|
//startLocalGame localTest = new startLocalGame();
|
||||||
//startMultiplayerGame multiplayerTest = new startMultiplayerGame();
|
//startMultiplayerGame multiplayerTest = new startMultiplayerGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,11 @@ public class MainMenuController implements ActionListener {
|
||||||
view.showPanel("MultiMenu");
|
view.showPanel("MultiMenu");
|
||||||
}else if (e.getSource() == view.getSoundButton()) {
|
}else if (e.getSource() == view.getSoundButton()) {
|
||||||
view.toggleMute();
|
view.toggleMute();
|
||||||
|
}else if(e.getSource() == view.getLocalButton()) {
|
||||||
|
model.setGameMode("LocalGame");
|
||||||
|
startLocalGame localGame = new startLocalGame();
|
||||||
|
view.addPanel(localGame.getLocalPanel(), "LocalMenu");
|
||||||
|
view.showPanel("LocalMenu");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -224,4 +224,7 @@ public class startLocalGame {
|
||||||
rightPlayerTextField.setText("Leicht");
|
rightPlayerTextField.setText("Leicht");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public JPanel getLocalPanel() {
|
||||||
|
return localGamePanel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue