📄 menuscreen.java
字号:
switch(titlestatus)
{
case 2: // '\002'
case 4: // '\004'
case 5: // '\005'
case 6: // '\006'
case 7: // '\007'
case 10: // '\n'
case 11: // '\013'
case 12: // '\f'
case 13: // '\r'
case 14: // '\016'
case 15: // '\017'
default:
break;
case 1: // '\001'
menuKeyPressed(i);
break;
case 3: // '\003'
setupKeyPressed(i);
break;
case 8: // '\b'
if(i == -5 || i == 8)
{
mindex = 5;
setTitleStatus((byte)1);
}
break;
case 9: // '\t'
rankviewKeyPressed(i);
break;
case 16: // '\020'
titlestatus = 1;
mindex = 4;
for(int j = 0; j < 6; j++)
irank[j] = "";
Runtime.getRuntime().gc();
break;
case 17: // '\021'
failKeypressed(i);
break;
}
}
public void idxMove(int i, int j)
{
mindex += i;
if(i < 0)
{
if(mindex < 0)
mindex = j;
} else
if(mindex > j)
mindex = 0;
}
private void menuKeyPressed(int i)
{
if(endmsg)
{
switch(i)
{
case 49: // '1'
setTitleStatus((byte)5);
break;
case 50: // '2'
endmsg = false;
break;
}
return;
}
switch(i)
{
default:
break;
case -1:
case 1: // '\001'
idxMove(-1, 6);
break;
case -2:
case 6: // '\006'
idxMove(1, 6);
break;
case 49: // '1'
gc.newGame();
if(i == 49)
return;
break;
case 50: // '2'
gc.setGameStatus((byte)21, (byte)0);
mindex = 0;
break;
case 51: // '3'
gc.setGameStatus((byte)17, (byte)0);
mindex = 0;
break;
case 52: // '4'
setTitleStatus((byte)3);
mindex = 0;
break;
case 53: // '5'
setTitleStatus((byte)9);
mindex = 0;
break;
case 54: // '6'
setTitleStatus((byte)8);
mindex = 0;
break;
case 55: // '7'
endmsg = true;
mindex = 0;
break;
case -5:
case 8: // '\b'
switch(mindex)
{
case 0: // '\0'
gc.newGame();
break;
case 1: // '\001'
gc.setGameStatus((byte)21, (byte)0);
break;
case 2: // '\002'
gc.setGameStatus((byte)17, (byte)0);
break;
case 3: // '\003'
setTitleStatus((byte)3);
break;
case 4: // '\004'
setTitleStatus((byte)9);
break;
case 5: // '\005'
setTitleStatus((byte)8);
break;
case 6: // '\006'
endmsg = true;
break;
}
mindex = 0;
break;
}
}
private void setupKeyPressed(int i)
{
switch(i)
{
case 0: // '\0'
case 3: // '\003'
case 4: // '\004'
case 7: // '\007'
case 9: // '\t'
case 10: // '\n'
case 11: // '\013'
case 12: // '\f'
case 13: // '\r'
case 14: // '\016'
case 15: // '\017'
case 16: // '\020'
case 17: // '\021'
case 18: // '\022'
case 19: // '\023'
case 20: // '\024'
case 21: // '\025'
case 22: // '\026'
case 23: // '\027'
case 24: // '\030'
case 25: // '\031'
case 26: // '\032'
case 27: // '\033'
case 28: // '\034'
case 29: // '\035'
case 30: // '\036'
case 31: // '\037'
case 32: // ' '
case 33: // '!'
case 34: // '"'
case 35: // '#'
case 36: // '$'
case 37: // '%'
case 38: // '&'
case 39: // '\''
case 40: // '('
case 41: // ')'
case 42: // '*'
case 43: // '+'
case 44: // ','
case 45: // '-'
case 46: // '.'
case 47: // '/'
case 48: // '0'
default:
break;
case -1:
case 1: // '\001'
if(Harry.cat2)
idxMove(-1, 2);
else
idxMove(-1, 3);
break;
case -2:
case 6: // '\006'
if(Harry.cat2)
idxMove(1, 2);
else
idxMove(1, 3);
break;
case -3:
case 2: // '\002'
if(mindex == 0)
{
gc.setSoundMin();
break;
}
if(mindex == 1)
{
rm.effectOnOff();
break;
}
if(mindex == 2)
{
gc.setSpeedMin();
break;
}
if(mindex == 3)
gc.setBg();
break;
case -4:
case 5: // '\005'
if(mindex == 0)
{
gc.setSoundMax();
break;
}
if(mindex == 1)
{
rm.effectOnOff();
break;
}
if(mindex == 2)
{
gc.setSpeedMax();
break;
}
if(mindex == 3 && !Harry.cat2)
gc.setBg();
break;
case 49: // '1'
mindex = 0;
gc.setSoundMax();
break;
case 50: // '2'
mindex = 1;
rm.effectOnOff();
break;
case 51: // '3'
mindex = 2;
gc.setSpeedMax();
break;
case 52: // '4'
if(!Harry.cat2)
{
mindex = 3;
gc.setBg();
}
break;
case -5:
case 8: // '\b'
mindex = 3;
setTitleStatus(prevstatus);
break;
}
}
private void rankviewKeyPressed(int i)
{
switch(i)
{
case 49: // '1'
titlestatus = 15;
gc.frame = -1;
break;
case -5:
case 8: // '\b'
case 50: // '2'
titlestatus = 1;
mindex = 4;
break;
}
}
public void failKeypressed(int i)
{
switch(i)
{
case 49: // '1'
titlestatus = 15;
gc.frame = -1;
break;
case 50: // '2'
titlestatus = 1;
break;
}
}
GameCanvas gc;
ResourceManager rm;
static final byte T_TITLE = 0;
static final byte T_MENU = 1;
static final byte T_SETUP = 3;
static final byte T_GAMEINFO = 8;
static final byte T_RANKINGVIEW = 9;
static final byte T_EXIT = 5;
static final byte T_LOGO = 11;
static final byte T_CONN = 15;
static final byte T_RESULT = 16;
static final byte T_FAIL = 17;
byte titlestatus;
byte prevstatus;
int tmp;
String irank[] = {
"", "", "", "", "", ""
};
StreamConnection sconn;
int torder;
static String mTxt[] = {
"1. \uAC8C\uC784\uC2DC\uC791", "2. \uC774\uC5B4\uD558\uAE30", "3. \uAC8C\uC784\uBC29\uBC95", "4. \uD658\uACBD\uC124\uC815", "5. \uB7AD\uD0B9\uBCF4\uAE30", "6. \uAC8C\uC784\uBB38\uC758", "7. \uAC8C\uC784\uC885\uB8CC"
};
int mindex;
private int tindex;
private int dindex;
private int sindex;
boolean endmsg;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -