📄 mainmenu.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: MainMenu.java
import java.io.PrintStream;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
public class MainMenu extends List
implements CommandListener
{
private TwirlEmUpMIDlet parent;
private GameScreen gameScreen;
private Top top;
public MainMenu(String p0, int p1, String p2[], Image p3[], TwirlEmUpMIDlet parent)
{
super(p0, p1, p2, p3);
this.parent = null;
init(parent);
Record.open();
Record.load();
Record.close();
}
public MainMenu(String p0, int p1, TwirlEmUpMIDlet parent)
{
super(p0, p1);
this.parent = null;
init(parent);
Record.open();
Record.load();
Record.close();
}
public void init(TwirlEmUpMIDlet parent)
{
this.parent = parent;
setCommandListener(this);
if(gameScreen != null && gameScreen.gameOver)
delete(0);
if(gameScreen != null && gameScreen.isPaused() && !gameScreen.gameOver)
{
if(!getString(0).equals(new String(Resources.getString(5))))
insert(0, Resources.getString(5), null);
setSelectedIndex(0, true);
} else
{
append(Resources.getString(0), null);
append(Resources.getString(1), null);
append(Resources.getString(2), null);
append(Resources.getString(3), null);
append(Resources.getString(4), null);
append(Resources.getString(8), null);
}
}
public void commandAction(Command p0, Displayable p1)
{
List lis = (List)p1;
String selected = lis.getString(lis.getSelectedIndex());
if(selected.equals(Resources.getString(0)))
{
if(gameScreen != null && gameScreen.isPaused())
gameScreen.gameThread.kill();
if(gameScreen != null)
System.out.println(gameScreen.toString());
top = new Top(parent, this, gameScreen);
parent.setDisplayable(top);
} else
if(selected.equals(Resources.getString(1)))
parent.setDisplayable(new OptionList(Resources.getString(1), 3, parent, this));
else
if(selected.equals(Resources.getString(2)))
parent.setDisplayable(new HighScore(parent, this));
else
if(selected.equals(Resources.getString(3)))
parent.setDisplayable(new Instructions(Resources.getString(3), parent, this));
else
if(selected.equals(Resources.getString(4)))
parent.setDisplayable(new About(Resources.getString(4), parent, this));
else
if(selected.equals(Resources.getString(8)))
parent.notifyDestroyed();
else
if(selected.equals(Resources.getString(5)) && gameScreen != null)
{
gameScreen.gameContinue();
parent.setDisplayable(gameScreen);
}
}
public void setGameScreen(GameScreen gameScreen)
{
this.gameScreen = gameScreen;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -