📄 startscreens.java
字号:
g.drawString(Translate("Press key for") + " " + Translate("Up"), 88, 182, 1 | 0x10);
}
break;
case 4: // '\004'
g.setColor(255, 233, 0);
g.drawString(Translate("Down") + ": " + Gc.getDescription(Gc.keyDown), 14, scrlY + 10 + 17 * (count + 4), 0x10 | 4);
if(showMessage)
{
g.setColor(255, 233, 0);
g.setFont(Font.getFont(0, 0, 8));
g.drawString(Translate("Press key for") + " " + Translate("Down"), 88, 182, 1 | 0x10);
}
break;
case 5: // '\005'
g.setColor(255, 233, 0);
g.drawString(Translate("Weapon") + ": " + Gc.getDescription(Gc.keyWeapon), 14, scrlY + 10 + 17 * (count + 5), 0x10 | 4);
if(showMessage)
{
g.setColor(255, 233, 0);
g.setFont(Font.getFont(0, 0, 8));
g.drawString(Translate("Press key for") + " " + Translate("Weapon"), 88, 182, 1 | 0x10);
}
break;
case 6: // '\006'
g.setColor(255, 233, 0);
g.drawString(Translate("Kick") + ": " + Gc.getDescription(Gc.keyKick), 14, scrlY + 10 + 17 * (count + 6), 0x10 | 4);
if(showMessage)
{
g.setColor(255, 233, 0);
g.setFont(Font.getFont(0, 0, 8));
g.drawString(Translate("Press key for") + " " + Translate("Kick"), 88, 182, 1 | 0x10);
}
break;
case 7: // '\007'
g.setColor(255, 233, 0);
g.drawString(Translate("Block") + ": " + Gc.getDescription(Gc.keyBlock), 14, scrlY + 10 + 17 * (count + 7), 0x10 | 4);
if(showMessage)
{
g.setColor(255, 233, 0);
g.setFont(Font.getFont(0, 0, 8));
g.drawString(Translate("Press key for") + " " + Translate("Block"), 88, 182, 1 | 0x10);
}
break;
case 8: // '\b'
g.setColor(255, 233, 0);
g.drawString(Translate("Game Options"), 14, scrlY + 10 + 17 * (count + 8), 0x10 | 4);
if(showMessage)
{
g.setColor(255, 233, 0);
g.setFont(Font.getFont(0, 0, 8));
g.drawString(Translate("One or More Keys Blank"), 88, 182, 1 | 0x10);
}
break;
}
g.setColor(66, 69, 66);
g.fillRect(0, 0, WIDTH, 63);
g.setColor(207, 12, 0);
g.drawRoundRect(10, 62, 157, 138, 10, 10);
g.setFont(Font.getFont(0, 0, 8));
g.setColor(255, 204, 0);
g.fillRoundRect(0, 42, WIDTH, 17, 20, 20);
g.setColor(200, 182, 236);
g.drawRoundRect(0, 42, WIDTH, 17, 20, 20);
g.setColor(0, 0, 0);
g.drawString(Translate("Key Setup"), WIDTH / 2, 43, 0x10 | 1);
}
catch(Exception exception)
{
System.out.println("in strtscr " + exception + " " + i);
}
}
public void readHelp(String s)
{
int i = 0;
try
{
String s1 = "";
Class class1 = getClass();
InputStream inputstream = class1.getResourceAsStream("/help." + s + ".txt");
DataInputStream datainputstream = new DataInputStream(inputstream);
byte abyte0[] = new byte[700];
try
{
datainputstream.read(abyte0);
}
catch(Exception exception)
{
System.out.println("2 " + exception);
}
if((char)abyte0[0] == 'A')
{
abyte0[0] = 32;
s1 = new String(abyte0, "ISO8859_1");
} else
if((char)abyte0[0] == 'B')
{
abyte0[0] = 32;
s1 = new String(abyte0, "UTF-8");
}
abyte0 = null;
inputstream.close();
datainputstream = null;
try
{
helpTextarr[i] = "";
for(int j = 1; j < s1.length(); j++)
{
if(s1.charAt(j) == '|' && s1.charAt(j + 1) == '|' && s1.charAt(j + 2) == '|')
break;
if(s1.charAt(j) == '~')
{
i++;
helpTextarr[i] = "";
} else
{
helpTextarr[i] += s1.charAt(j);
}
}
}
catch(Exception exception1)
{
System.out.println("1 " + exception1);
}
}
catch(IOException ioexception)
{
ioexception.printStackTrace();
System.out.println(ioexception);
}
}
public void readAbut(String s)
{
int i = 0;
try
{
String s1 = "";
Class class1 = getClass();
InputStream inputstream = class1.getResourceAsStream("/about." + s + ".txt");
DataInputStream datainputstream = new DataInputStream(inputstream);
byte abyte0[] = new byte[200];
try
{
datainputstream.read(abyte0);
}
catch(Exception exception)
{
System.out.println("2 " + exception);
}
if((char)abyte0[0] == 'A')
{
abyte0[0] = 32;
s1 = new String(abyte0, "ISO8859_1");
} else
if((char)abyte0[0] == 'B')
{
abyte0[0] = 32;
s1 = new String(abyte0, "UTF-8");
}
abyte0 = null;
inputstream.close();
datainputstream = null;
try
{
abutTextarr[i] = "";
for(int j = 1; j < s1.length(); j++)
{
if(s1.charAt(j) == '|' && s1.charAt(j + 1) == '|' && s1.charAt(j + 2) == '|')
break;
if(s1.charAt(j) == '~')
{
i++;
abutTextarr[i] = "";
} else
{
abutTextarr[i] += s1.charAt(j);
}
}
}
catch(Exception exception1)
{
System.out.println("1 " + exception1);
}
}
catch(IOException ioexception)
{
ioexception.printStackTrace();
System.out.println(ioexception);
}
}
public void readDirectory()
{
int i = 0;
try
{
String s = "";
Class class1 = getClass();
InputStream inputstream = class1.getResourceAsStream("/texts." + lang + ".txt");
DataInputStream datainputstream = new DataInputStream(inputstream);
byte abyte0[] = new byte[2000];
try
{
datainputstream.readFully(abyte0);
}
catch(Exception exception)
{
System.out.println("2 " + exception);
}
if((char)abyte0[0] == 'A')
{
abyte0[0] = 32;
s = new String(abyte0, "ISO8859_1");
} else
if((char)abyte0[0] == 'B')
{
abyte0[0] = 32;
s = new String(abyte0, "UTF-8");
}
abyte0 = null;
inputstream.close();
datainputstream = null;
try
{
Directory[i] = "";
for(int j = 1; j < s.length(); j++)
{
if(s.charAt(j) == '|' && s.charAt(j + 1) == '|' && s.charAt(j + 2) == '|')
break;
if(s.charAt(j) == '~')
{
i++;
Directory[i] = "";
} else
{
Directory[i] += s.charAt(j);
}
}
}
catch(Exception exception1)
{
System.out.println("1 " + exception1);
}
}
catch(IOException ioexception)
{
ioexception.printStackTrace();
System.out.println(ioexception);
}
directoryLength = (byte)i;
}
public String Translate(String s)
{
try
{
for(int i = 0; i < directoryLength; i++)
if(s.equals(Directory[i].substring(0, Directory[i].indexOf('*'))))
return Directory[i].substring(Directory[i].indexOf('*') + 1, Directory[i].length());
}
catch(Exception exception)
{
System.out.println("herer" + exception);
}
return "";
}
private int WIDTH;
private int HEIGHT;
int selRectPos;
GameCanvas Gc;
Image logo;
Image dblogo;
Image title;
Image title_sm;
Image keyB;
int scrlY;
int count;
String helpTextarr[];
String abutTextarr[];
String lang;
String LangLabel[];
byte numLangs;
String Directory[];
byte directoryLength;
boolean showMessage;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -