⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pinguhelp.java

📁 j2me_nokia_flash打企鹅手机版
💻 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 + -