📄 cmenu.java
字号:
/*
* CMenu.java
*
* Created on 2006年5月12日, 下午10:36
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package gamepacket;
import java.io.IOException;
import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.*;
/**
*
* @author zxh
*/
public class CMenu
{
private Sprite spt_logo;//菜单背景
public Sprite spt_icon;//选择图标
private int dx,dy;//图标位置
public long tempTime;
/**
* Creates a new instance of CMenu
*/
public CMenu (LayerManager lm)
{
try
{
spt_icon=new Sprite(Image.createImage ("/img/icon.png"));
spt_logo=new Sprite(Image.createImage ("/img/logo.png"));
} catch (IOException ex){}
lm.append (spt_icon);
lm.append (spt_logo);
dx=60;
dy=135;
spt_icon.setPosition (dx,dy);
tempTime=System.currentTimeMillis ();
}
public void MoveUp()
{
if(dy==135)
{
dy=155;
}
else
{
dy=135;
}
spt_icon.setPosition (dx,dy);
}
public int GetDy()
{
return dy;
}
/*public void MoveDown()
{
if(dy==70)
{
dy=90;
}
else
{
dy=70;
}
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -