Grafiken in graphics Ordner verschoben
This commit is contained in:
parent
95a9efa772
commit
393984343c
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 959 B After Width: | Height: | Size: 959 B |
|
@ -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);
|
||||
|
|
|
@ -3,13 +3,14 @@ import javax.swing.JFrame;
|
|||
import javax.swing.*;
|
||||
|
||||
public class MainMenuView {
|
||||
ImageIcon SoundIcon = new ImageIcon("Grafik/sound button.png");
|
||||
ImageIcon SoundIcon = new ImageIcon("graphics/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();
|
||||
|
@ -33,7 +34,7 @@ public class MainMenuView {
|
|||
frame.setSize(1500,1000);
|
||||
frame.setVisible(true);
|
||||
frame.getContentPane().setBackground( Color.decode("#98F5FF"));
|
||||
JLabel backgroundLabel = new JLabel(new ImageIcon("Grafik/mainmenubackground.png"));
|
||||
JLabel backgroundLabel = new JLabel(new ImageIcon("graphics/mainmenubackground.png"));
|
||||
frame.setContentPane(backgroundLabel);
|
||||
frame.add(titelLabel);
|
||||
frame.add(lokalButton);
|
||||
|
@ -43,7 +44,7 @@ public class MainMenuView {
|
|||
}
|
||||
|
||||
public void toggleMute(){
|
||||
ImageIcon MuteIcon = new ImageIcon("Grafik/sound button muted.png");
|
||||
ImageIcon MuteIcon = new ImageIcon("graphics/sound button muted.png");
|
||||
if(soundButton.getIcon()==SoundIcon) {
|
||||
soundButton.setIcon(MuteIcon);
|
||||
}else{
|
||||
|
@ -51,7 +52,7 @@ public class MainMenuView {
|
|||
}
|
||||
}
|
||||
|
||||
public void closeWindOw(){
|
||||
public void closeWindow(){
|
||||
frame.dispose();
|
||||
}
|
||||
public JFrame getFrame() {
|
||||
|
|
|
@ -3,7 +3,7 @@ import javax.swing.JFrame;
|
|||
import javax.swing.*;
|
||||
|
||||
public class MultiMenuView {
|
||||
ImageIcon SoundIcon = new ImageIcon("Grafik/sound button.png");
|
||||
ImageIcon SoundIcon = new ImageIcon("graphics/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("Grafik/mainmenubackground.png"));
|
||||
JLabel backgroundLabel = new JLabel(new ImageIcon("graphics/mainmenubackground.png"));
|
||||
frame.setContentPane(backgroundLabel);
|
||||
frame.add(soundButton);
|
||||
frame.setLocationRelativeTo(null);
|
||||
}
|
||||
|
||||
public void toggleMute(){
|
||||
ImageIcon MuteIcon = new ImageIcon("Grafik/sound button muted.png");
|
||||
ImageIcon MuteIcon = new ImageIcon("graphics/sound button muted.png");
|
||||
if(soundButton.getIcon()==SoundIcon) {
|
||||
soundButton.setIcon(MuteIcon);
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue