mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 07:29:45 +02:00
Menü hinzugefügt.
This commit is contained in:
@@ -54,6 +54,10 @@ public class Main extends JFrame implements Runnable {
|
||||
|
||||
private static JPanel menuPanel;
|
||||
|
||||
public void repack() {
|
||||
pack();
|
||||
}
|
||||
|
||||
public Main(){
|
||||
setTitle("HeatUP!");
|
||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PanelBuilder {
|
||||
public static void tick() {
|
||||
switch (MenuPanel.gameExists) {
|
||||
case 1:
|
||||
Logger.write("Menu tick");
|
||||
//Logger.write("Menu tick");
|
||||
break;
|
||||
case 2:
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@@ -118,6 +118,11 @@ public class PanelBuilder {
|
||||
public static JPanel getGamePanel() {
|
||||
return gamePanel;
|
||||
}
|
||||
|
||||
public static JPanel getOuterPanel() {
|
||||
return outerPanel;
|
||||
}
|
||||
|
||||
public static void createGame(int map) {
|
||||
|
||||
instancedObjects = new InstancedObjects();
|
||||
|
||||
@@ -93,8 +93,11 @@ public class MenuPanel {
|
||||
gameExists = 2;
|
||||
menuPanel.setVisible(false);
|
||||
|
||||
PanelBuilder.getGamePanel().setVisible(true);
|
||||
PanelBuilder.getOuterPanel().add(PanelBuilder.getGamePanel(),BorderLayout.CENTER);
|
||||
|
||||
// PanelBuilder.getGamePanel().setSize(800, 600);
|
||||
// PanelBuilder.getGamePanel().setVisible(true);
|
||||
|
||||
|
||||
//** game, action, status panel redraw and check visibility */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user