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

📄 gamedialogboxtest.java

📁 j2me游戏引擎 j2me游戏引擎
💻 JAVA
字号:
package cn.org.matrix.gmatrix.practice.demo01;

import javax.microedition.lcdui.Font;
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display;
import cn.org.matrix.gmatrix.gameLab.util.ui.*;
import cn.org.matrix.gmatrix.gameLab.control.*;
/**
 * GameDialogBox测试类
 * @author cleverpig
 *
 */
public class GameDialogBoxTest extends MIDlet{
	
	public void startApp(){
		Description des=new Description();
		des.setCols(20);
		des.setRows(1);
		des.setContent("对话框测试文字");
		des.setContentColor(0x00ffff);
		des.setFont(Font.getDefaultFont());
		
		GameDialogBox gdb=new GameDialogBox();
		int bgColor=0xff0000;
		int uibgColor=0xff000f;
		int borderColor=0xffff00;
		gdb.getColorScheme().setBgColor(bgColor);
		gdb.getColorScheme().setUIBgColor(uibgColor);
		gdb.getColorScheme().setUIBorderColor(borderColor);
		gdb.setDescription(des);
		gdb.setAffirmKey(KeyManager.OK_KEYPRESS);
		gdb.setCancelKey(KeyManager.CANCEL_KEYPRESS);
		gdb.getScope().setUIHeight(gdb.getHeight()/2);
		gdb.getScope().setUIWidth(gdb.getWidth()/2);
		gdb.getScope().setLeftTopCoordinates(gdb.getWidth()/4,gdb.getHeight()/4);
		gdb.setStuffingHeight(10);
		gdb.setStuffingWidth(10);
		gdb.setType(GameDialogBox.CLOSE_UNTILTIMEOUT);
		gdb.setWaitTime(2000);
		Thread gdbTh=new Thread(gdb);
		gdbTh.start();
		Display.getDisplay(this).setCurrent(gdb);
		
	}
	
	public void pauseApp(){
	}
	
	public void destroyApp(boolean force){
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -