mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 10:19:46 +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;
|
private static JPanel menuPanel;
|
||||||
|
|
||||||
|
public void repack() {
|
||||||
|
pack();
|
||||||
|
}
|
||||||
|
|
||||||
public Main(){
|
public Main(){
|
||||||
setTitle("HeatUP!");
|
setTitle("HeatUP!");
|
||||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user