Menü hinzugefügt.

This commit is contained in:
andreas
2015-01-13 11:48:07 +01:00
parent 10e023fd6c
commit f12d3fc9c2
3 changed files with 14 additions and 2 deletions
+4
View File
@@ -54,6 +54,10 @@ public class Main extends JFrame implements Runnable {
private static JPanel menuPanel; private static JPanel menuPanel;
public void repack() {
pack();
}
public Main(){ public Main(){
setTitle("HeatUP!"); setTitle("HeatUP!");
setDefaultCloseOperation(EXIT_ON_CLOSE); setDefaultCloseOperation(EXIT_ON_CLOSE);
+6 -1
View File
@@ -49,7 +49,7 @@ public class PanelBuilder {
public static void tick() { public static void tick() {
switch (MenuPanel.gameExists) { switch (MenuPanel.gameExists) {
case 1: case 1:
Logger.write("Menu tick"); //Logger.write("Menu tick");
break; break;
case 2: case 2:
EventQueue.invokeLater(new Runnable() { EventQueue.invokeLater(new Runnable() {
@@ -118,6 +118,11 @@ public class PanelBuilder {
public static JPanel getGamePanel() { public static JPanel getGamePanel() {
return gamePanel; return gamePanel;
} }
public static JPanel getOuterPanel() {
return outerPanel;
}
public static void createGame(int map) { public static void createGame(int map) {
instancedObjects = new InstancedObjects(); instancedObjects = new InstancedObjects();
+4 -1
View File
@@ -93,7 +93,10 @@ public class MenuPanel {
gameExists = 2; gameExists = 2;
menuPanel.setVisible(false); 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 */ //** game, action, status panel redraw and check visibility */