📄 control.java
字号:
import java.io.IOException;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class control extends MIDlet {
private gameCanvas gameScreen;
/**构造器*/
public control() {
}
/**开始MIDlet*/
public void startApp() {
Displayable current = Display.getDisplay(this).getCurrent();
if (current == null) {
Image logo = null;
try {
logo = Image.createImage("/mine.png");
}
catch (IOException e) {
System.err.println("no this image");
}
Alert splashScreen = new Alert(null,"", logo, AlertType.INFO); //显示一个logo
splashScreen.setTimeout(4000);
gameScreen = new gameCanvas(this);
// 加另一窗口进入
Display.getDisplay(this).setCurrent(splashScreen, gameScreen);
}
else {
Display.getDisplay(this).setCurrent(current);
}
}
/*暂停MIDlet*/
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
/**退出MIDlet*/
public void quit() {
destroyApp(false);
notifyDestroyed();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -