?? pinguhelp.java
字號:
import javax.microedition.lcdui.*;
// Referenced classes of package ys.pingu:
// PinguMIDlet
class PinguHelp extends Canvas
implements CommandListener
{
private static final String helpString[] = {
"Instructions", " ", "Press any key to let", "Pingu jump.", "Press any key to", "pitch the Pingu.", " ", "You need 5 hits to", "score. The highscore", "lists only the top 5", "scores."
};
private static final String aboutString[] = {
" ","Yeti 7610"," ","Modified by","Yoshi Ren"," ","All rights reserved", "CyberTran", "cyberlife.blogchina.com", " " , " "};
private final int ANCHOR = 17;
private final Command backCommand = new Command("Back", 2, 1);
private PinguMIDlet parent;
private int frameWidth;
private int frameHeight;
private int type;
private Font f;
private int fh;
private int r;
private int g;
private int b;
PinguHelp(PinguMIDlet pingumidlet)
{
frameWidth = getWidth();
frameHeight = getHeight();
type = 0;
f = Font.getFont(0, 1, 8);
fh = f.getHeight() + 1;
parent = pingumidlet;
type = 0;
addCommand(backCommand);
setCommandListener(this);
}
public void init(int i)
{
type = i;
}
public void commandAction(Command command, Displayable displayable)
{
parent.pinguHelpBack();
}
protected void paint(Graphics g1)
{
g1.setFont(f);
r = 0;
g = 1;
b = 2;
for(int i = 0; i < frameHeight; i += 2)
{
r = 0;
g++;
b += 2;
g1.setColor(r, g, b);
g1.fillRect(0, i, frameWidth, i + 3);
}
g1.setColor(0xffffff);
for(int j = 0; j < 11; j++)
g1.drawString(type != 0 ? aboutString[j] : helpString[j], frameWidth / 2, j * fh + 5, 17);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -