mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:59:44 +02:00
fixed panel background when menu is displayed
This commit is contained in:
@@ -100,30 +100,32 @@ public class Main extends JFrame implements Runnable {
|
||||
|
||||
MenuPanel.setMenuPanel();
|
||||
menuPanel = MenuPanel.getMenuPanel();
|
||||
|
||||
|
||||
outerPanel.add(statusPanel,BorderLayout.NORTH);
|
||||
outerPanel.add(leftPanel, BorderLayout.WEST);
|
||||
outerPanel.add(rightPanel, BorderLayout.EAST);
|
||||
outerPanel.add(gamePanel,BorderLayout.CENTER);
|
||||
outerPanel.add(actionPanel,BorderLayout.SOUTH);
|
||||
|
||||
outerPanel.add(menuPanel, BorderLayout.CENTER);
|
||||
outerPanel.add(actionPanel,BorderLayout.SOUTH);
|
||||
outerPanel.add(menuPanel, BorderLayout.CENTER);
|
||||
|
||||
add(outerPanel);
|
||||
pack();
|
||||
setVisible(true);
|
||||
pack();
|
||||
setVisible(true);
|
||||
|
||||
/*
|
||||
* hier menue bauen
|
||||
*/
|
||||
PanelBuilder.setPanels(actionPanel, outerPanel, statusPanel, gamePanel);
|
||||
PanelBuilder.startMenu();
|
||||
//PanelBuilder.startMenu();
|
||||
|
||||
PanelBuilder.actionPanel.setBackground(Color.BLACK);
|
||||
PanelBuilder.statusPanel.setBackground(Color.BLACK);
|
||||
|
||||
|
||||
/*
|
||||
* entfernen wenn getter verwendet wird.
|
||||
*/
|
||||
player01 = PanelBuilder.getPlayer();
|
||||
|
||||
|
||||
/*
|
||||
* Wenn die Variable fullscreen gesetzt ist, wir er hier eingeschaltet.
|
||||
@@ -162,7 +164,7 @@ public class Main extends JFrame implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
final Main frame = new Main();
|
||||
frame.repaint();
|
||||
frame.repaint();
|
||||
Thread ht= new Thread(){
|
||||
|
||||
@Override
|
||||
@@ -280,6 +282,9 @@ public class Main extends JFrame implements Runnable {
|
||||
PanelBuilder.tick();
|
||||
} else if ( pause ) {
|
||||
// Hier einfügen was passiert wenn ESC gedrückt wird
|
||||
|
||||
outerPanel.setBackground(Color.BLACK);
|
||||
|
||||
gamePanel.setVisible(false);
|
||||
actionPanel.setVisible(false);
|
||||
statusPanel.setVisible(false);
|
||||
|
||||
@@ -109,12 +109,12 @@ public class PanelBuilder {
|
||||
//StatusPanelAdder.createPanel();
|
||||
|
||||
// ActionPanel bauen
|
||||
//ActionControl.setPanel(actionPanel);
|
||||
|
||||
//ActionControl.setPanel(actionPanel);
|
||||
|
||||
//createGame(1); /* wird eigentlich vom menue aufgerufen */
|
||||
|
||||
}
|
||||
|
||||
public static JPanel getGamePanel() {
|
||||
return gamePanel;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class MenuPanel {
|
||||
}
|
||||
|
||||
public static void setMenuPanel() {
|
||||
|
||||
|
||||
menuPanel.setPreferredSize(new Dimension(800,600));
|
||||
menuPanel.setFocusable(false);
|
||||
|
||||
@@ -55,11 +55,11 @@ public class MenuPanel {
|
||||
createHighscore();
|
||||
createCredits();
|
||||
createTutorial();
|
||||
|
||||
|
||||
buildMenuPanel();
|
||||
}
|
||||
|
||||
public static JPanel getMenuPanel() {
|
||||
public static JPanel getMenuPanel() {
|
||||
menuPanel.setVisible(true);
|
||||
return menuPanel;
|
||||
}
|
||||
@@ -203,5 +203,6 @@ public class MenuPanel {
|
||||
menuPanel.add(highscore);
|
||||
menuPanel.add(credits);
|
||||
menuPanel.add(tutorial);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user