mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:59:44 +02:00
fixes
This commit is contained in:
@@ -54,7 +54,6 @@ public class Main extends JFrame implements Runnable {
|
|||||||
private static JPanel actionPanel;
|
private static JPanel actionPanel;
|
||||||
private static JPanel creditsPanel;
|
private static JPanel creditsPanel;
|
||||||
|
|
||||||
|
|
||||||
private static JPanel menuPanel;
|
private static JPanel menuPanel;
|
||||||
|
|
||||||
public void repack() {
|
public void repack() {
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.awt.Color;
|
|||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.GridLayout;
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
@@ -13,14 +15,15 @@ import de.heatup.highscore.ScoreEntry;
|
|||||||
import de.heatup.logging.Logger;
|
import de.heatup.logging.Logger;
|
||||||
import de.heatup.mapengine.MapEngine;
|
import de.heatup.mapengine.MapEngine;
|
||||||
import de.heatup.ui.FontLoader;
|
import de.heatup.ui.FontLoader;
|
||||||
|
import de.heatup.ui.PanelBuilder;
|
||||||
|
|
||||||
public class HighscorePanel {
|
public class HighscorePanel {
|
||||||
|
|
||||||
private static JPanel highscorePanel = new JPanel();
|
private static JPanel highscorePanel = new JPanel();
|
||||||
|
|
||||||
// panels and labels
|
// panels and labels
|
||||||
private static JPanel headingPanel, dividerPanel;
|
private static JPanel headingPanel, dividerPanel, exit;
|
||||||
private static JLabel headingLabel, dividerLabel;
|
private static JLabel headingLabel, dividerLabel, exitLabel;
|
||||||
private static JPanel scores;
|
private static JPanel scores;
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +59,28 @@ public class HighscorePanel {
|
|||||||
|
|
||||||
initHighscorePanelContent();
|
initHighscorePanelContent();
|
||||||
highscorePanel.add(scores, BorderLayout.CENTER);
|
highscorePanel.add(scores, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
exit = new JPanel();
|
||||||
|
exit.setBackground(Color.BLACK);
|
||||||
|
|
||||||
|
exitLabel = new JLabel("[ zurück zum Menü ]");
|
||||||
|
exitLabel.setForeground(Color.YELLOW);
|
||||||
|
exitLabel.setFont(emulogicSmall);
|
||||||
|
|
||||||
|
exitLabel.addMouseListener(new MouseAdapter() {
|
||||||
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
// @TODO: implement show credits
|
||||||
|
HighscorePanel.getHighscorePanel().setVisible(false);
|
||||||
|
|
||||||
|
PanelBuilder.getOuterPanel().add(MenuPanel.getMenuPanel(), BorderLayout.CENTER);
|
||||||
|
MenuPanel.getMenuPanel().setVisible(true);
|
||||||
|
|
||||||
|
Logger.write("back to menu");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
exit.add(exitLabel);
|
||||||
|
// highscorePanel.add(exit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,6 +230,10 @@ public class MenuPanel {
|
|||||||
showTutorial.addMouseListener(new MouseAdapter() {
|
showTutorial.addMouseListener(new MouseAdapter() {
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
// @TODO: implement show tutorial
|
// @TODO: implement show tutorial
|
||||||
|
|
||||||
|
menuPanel.setVisible(false);
|
||||||
|
TutorialPanel p = new TutorialPanel();
|
||||||
|
PanelBuilder.getOuterPanel().add(TutorialPanel.getTutorialPanel(), BorderLayout.CENTER);
|
||||||
Logger.write("show tutorial");
|
Logger.write("show tutorial");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user