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
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
if (e.getSource() == view.getMultiButton()) {
|
if (e.getSource() == view.getMultiButton()) {
|
||||||
view.closeWindOw();
|
view.closeWindow();
|
||||||
MultiMenuModel model = new MultiMenuModel();
|
MultiMenuModel model = new MultiMenuModel();
|
||||||
MultiMenuView view = new MultiMenuView();
|
MultiMenuView view = new MultiMenuView();
|
||||||
MultiMenuController controller2 = new MultiMenuController(model, view);
|
MultiMenuController controller2 = new MultiMenuController(model, view);
|
||||||
|
|
|
@ -3,13 +3,14 @@ import javax.swing.JFrame;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
public class MainMenuView {
|
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 JFrame frame = new JFrame();
|
||||||
private JLabel titelLabel = new JLabel("Studium versenken");
|
private JLabel titelLabel = new JLabel("Studium versenken");
|
||||||
private JButton lokalButton = new JButton("Lokal");
|
private JButton lokalButton = new JButton("Lokal");
|
||||||
private JButton multiButton= new JButton("Multiplayer");
|
private JButton multiButton= new JButton("Multiplayer");
|
||||||
private JButton soundButton = new JButton(SoundIcon);
|
private JButton soundButton = new JButton(SoundIcon);
|
||||||
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
|
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
|
||||||
|
|
||||||
public MainMenuView() {
|
public MainMenuView() {
|
||||||
buildFrame();
|
buildFrame();
|
||||||
buildComponents();
|
buildComponents();
|
||||||
|
@ -33,7 +34,7 @@ public class MainMenuView {
|
||||||
frame.setSize(1500,1000);
|
frame.setSize(1500,1000);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
frame.getContentPane().setBackground( Color.decode("#98F5FF"));
|
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.setContentPane(backgroundLabel);
|
||||||
frame.add(titelLabel);
|
frame.add(titelLabel);
|
||||||
frame.add(lokalButton);
|
frame.add(lokalButton);
|
||||||
|
@ -43,7 +44,7 @@ public class MainMenuView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleMute(){
|
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) {
|
if(soundButton.getIcon()==SoundIcon) {
|
||||||
soundButton.setIcon(MuteIcon);
|
soundButton.setIcon(MuteIcon);
|
||||||
}else{
|
}else{
|
||||||
|
@ -51,7 +52,7 @@ public class MainMenuView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeWindOw(){
|
public void closeWindow(){
|
||||||
frame.dispose();
|
frame.dispose();
|
||||||
}
|
}
|
||||||
public JFrame getFrame() {
|
public JFrame getFrame() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import javax.swing.JFrame;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
public class MultiMenuView {
|
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 JFrame frame = new JFrame();
|
||||||
private JButton soundButton = new JButton(SoundIcon);
|
private JButton soundButton = new JButton(SoundIcon);
|
||||||
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
|
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
|
||||||
|
@ -24,14 +24,14 @@ public class MultiMenuView {
|
||||||
frame.setSize(1500,1000);
|
frame.setSize(1500,1000);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
frame.getContentPane().setBackground( Color.decode("#98F5FF"));
|
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.setContentPane(backgroundLabel);
|
||||||
frame.add(soundButton);
|
frame.add(soundButton);
|
||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleMute(){
|
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) {
|
if(soundButton.getIcon()==SoundIcon) {
|
||||||
soundButton.setIcon(MuteIcon);
|
soundButton.setIcon(MuteIcon);
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue