📄 gamereadme.java~4~
字号:
package genius.game.mobile.bachelor;
import javax.microedition.lcdui.*;
/**
* <p>Title: GENIUS bachelor</p>
* <p>Description: GENIUS Mobile Game - Bachelor</p>
* <p>Copyright: Copyright (c) 2002 GENIUS Tech.</p>
* <p>Company: GENIUS Technology Software Development Union.</p>
* @author Rodger hu
* @version 1.01
*/
public class gameReadme extends Form implements CommandListener {
private Displayable parentDisplayable;
private Command cmdExit = new Command("退出", Command.EXIT, 1);
StringItem stringItem1;
/**Construct the displayable*/
public gameReadme() {
super("游戏说明");
//"欧洲中世纪,一个寂寞的单身贵族发明了这种后来享誉世界的个人益智玩具。一枚棋子在跳过另一枚棋子后,被跨越的棋子就要取出棋盘......如此反复,最后要求剩下一枚棋子在棋盘的中心点。当然,第一次进行游戏可能达不到这个要求,但可以从剩下的棋子多少来判断自己的智慧能力。此游戏可以很好的锻炼玩家的逻辑推理能力,并具有训练左右脑同时思考的功效。"
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception {
// set up this Displayable to listen to command events
stringItem1 = new StringItem("", "欧洲中世纪,一个寂寞的单身贵族发明了这种后来享誉世界的个人益智玩具。一枚棋子在跳过另一枚棋子后,被跨越的棋子就要取出棋盘......如此反复,最后要求剩下一枚棋子在棋盘的中心点。当然,第一次进行游戏可能达不到这个要求,但可以从剩下的棋子多少来判断自己的智慧能力。此游戏可以很好的锻炼玩家的逻辑推理能力,并具有训练左右脑同时思考的功效。");
setCommandListener(this);
// add the Exit command
addCommand(cmdExit);
this.append(stringItem1);
}
/**Handle command events*/
public void commandAction(Command command, Displayable displayable) {
if (command == cmdExit)
{
Display.getDisplay(mainGame.instance).setCurrent(parentDisplayable);
}
}
public void setParent(Displayable displayable) {
if (displayable == null)
{
Alert a = new Alert("Error");
a.setString("The displayable == null");
a.setTimeout(2000);
Display.getDisplay(mainGame.instance).setCurrent(a);
}
parentDisplayable = displayable;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -