?? scrollmessageboxtestmidlet.java
字號:
package redduke.game.j2me.example;
import redduke.game.j2me.GameMIDlet;
import redduke.game.j2me.ui.*;
/*
* ScrollMesssageBox 測試
*
* @author redduke
*
*/
public class ScrollMessageBoxTestMIDlet extends GameMIDlet {
public ScrollMessageBoxTestMIDlet() {
super(new ScrollMessageBoxTestCanvas());
}
static class ScrollMessageBoxTestCanvas extends GameCanvas {
ScrollMessageBox msg = new ScrollMessageBox();
{
super.setBackGround(Color.blue);
add(msg);
msg.setString("<h><u><color=0xff0000>游戲說明</color></h></u><color=0xff00><p>dabcdas dijdeijfeo fwhfoireh troieuhtroieuh trioehtie uhtieuhtrieuhteiruhtiueht abc!\n<p>abc\na\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no");
}
protected void main() {
if (super.lastPressed(KEY_NUM0)) {
msg.reset();
} else if (super.lastPressed(KEY_NUM1))
msg.stopAnimate();
else if (super.lastPressed(KEY_NUM2))
msg.startAnimate();
super.clearKey();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -