2.Teil
}
if(i2 < 8)
{
W.drawImage(b[i2], 0, 0, this);
int k3 = 0;
for(int j4 = 0; j4 < L; j4++)
if(j4 < l1)
k3 += a[j4].getHeight(this);
W.drawImage(a[l1], 0, k3, this);
i2++;
} else
{
flag = false;
}
if(U && i3 >= 0)
{
j1 = i3;
U = false;
}
if(j1 >= 0)
{
flag = true;
int l3 = 0;
for(int k4 = 0; k4 < L; k4++)
if(k4 < j1)
l3 += a[k4].getHeight(this);
for(i2--; l3 > 0 || i2 > 0;)
{
R = System.currentTimeMillis();
int i5 = 0;
if(i2 > 0)
{
for(int k5 = 0; k5 < L; k5++)
{
if(k5 != j1)
W.drawImage(a[k5], 0, i5, this);
i5 += a[k5].getHeight(this);
}
}
W.drawImage(b[i2], 0, 0, this);
W.drawImage(a[j1], 0, l3, this);
if(--i2 < 0)
i2 = 0;
l3 -= G;
if(l3 < 0)
l3 = 0;
T = true;
update(V);
T = false;
try
{
Thread.sleep(Math.max(5L, (R + (long)I) - System.currentTimeMillis()));
}
catch(Exception _ex) { }
}
}
}
T = true;
update(V);
T = false;
try
{
Thread.sleep(Math.max(5L, (R + (long)I) - System.currentTimeMillis()));
}
catch(Exception _ex) { }
} while(true);
}
public boolean mouseExit(Event event, int l, int i1)
{
S = false;
N = -1;
O = -1;
return true;
}
public boolean mouseEnter(Event event, int l, int i1)
{
S = true;
return true;
}
public boolean mouseMove(Event event, int l, int i1)
{
N = l;
O = i1;
return true;
}
public boolean mouseDown(Event event, int l, int i1)
{
U = true;
return true;
}
boolean D(Image image)
{
MediaTracker mediatracker = new MediaTracker(this);
mediatracker.addImage(image, 0);
try
{
mediatracker.waitForID(0);
}
catch(InterruptedException _ex) { }
return !mediatracker.isErrorAny();
}
public void N()
{
H = L("fontsize", 10);
P = G("font");
boolean flag = G("italic").substring(0, 1).equalsIgnoreCase("y");
boolean flag1 = G("bold").substring(0, 1).equalsIgnoreCase("y");
int i1;
if(flag1)
i1 = 1;
else
i1 = 0;
B = new Font(P, i1 + (flag ? 2 : 0), H);
J = L("background", 16);
K = L("textcolor", 16);
I = L("delay", 10);
G = Math.max(L("movespeed", 16), 1);
Q = G("target");
for(L = 0; G("menuitem" + L) != null; L++);
a = new Image[L];
Y = new String[L][];
c = new Image[L][];
Image image = getImage(getCodeBase(), G("image"));
boolean flag2 = D(image);
for(int l = 0; l < L; l++)
{
int j1;
if(flag2)
{
j1 = image.getHeight(this);
a[l] = createImage(image.getWidth(this), j1);
} else
{
j1 = F / L;
a[l] = createImage(E, j1);
}
Graphics g1 = a[l].getGraphics();
int i2;
if(flag1)
i2 = 1;
else
i2 = 0;
Font font = new Font(P, i2 + (flag ? 2 : 0), L("fontsize", 10));
g1.setFont(font);
FontMetrics fontmetrics = g1.getFontMetrics(font);
if(flag2)
g1.drawImage(image, 0, 0, this);
else
g1.drawImage(D, 0, -l * j1, this);
g1.setColor(new Color(K));
String s = G("menuitem" + l);
g1.drawString(s, (E - fontmetrics.stringWidth(s)) / 2, (j1 - fontmetrics.getHeight()) / 2 + fontmetrics.getAscent());
int k1;
for(k1 = 0; G("menuitem" + l + "," + k1) != null; k1++);
c[l] = new Image[k1];
Y[l] = new String[k1];
Image image1 = getImage(getCodeBase(), G("image" + l));
boolean flag3 = D(image1);
for(int l1 = 0; l1 < k1; l1++)
{
int j2;
if(flag3)
{
j2 = image1.getHeight(this);
c[l][l1] = createImage(E, j2);
} else
{
j2 = (F - F / L) / k1;
c[l][l1] = createImage(E, j2);
}
Graphics g2 = c[l][l1].getGraphics();
int k2;
if(flag1)
k2 = 1;
else
k2 = 0;
Font font1 = new Font(P, k2 + (flag ? 2 : 0), L("fontsize" + l, 10));
g2.setFont(font1);
FontMetrics fontmetrics1 = g2.getFontMetrics(font1);
if(flag3)
g2.drawImage(image1, 0, 0, this);
else
g2.drawImage(D, 0, -l1 * j2 - j1, this);
g2.setColor(new Color(L("textcolor" + l, 16)));
String s1 = G("menuitem" + l + "," + l1);
g2.drawString(s1, (E - fontmetrics1.stringWidth(s1)) / 2, (j2 - fontmetrics1.getHeight()) / 2 + fontmetrics1.getAscent());
Y[l][l1] = G("url" + l + "," + l1);
}
}
}
public Image B(Image image, int l, int i1)
{
Image image1;
for(image1 = createImage(l, i1); !image1.getGraphics().drawImage(image, 0, 0, l, i1, this););
return image1;
}
public void paint(Graphics g1)
{
if(C != null && T)
g1.drawImage(C, 0, 0, this);
}
public void update(Graphics g1)
{
paint(g1);
}
public void start()
{
if(A == null)
{
A = new Thread(this);
A.start();
}
}
public void stop()
{
if(A != null && A.isAlive())
A.stop();
A = null;
}
public int L(String s, int l)
{
String s1 = G(s);
int i1;
try
{
i1 = Integer.parseInt(s1, l);
}
catch(NumberFormatException _ex)
{
return 0;
}
return i1;
}
public int F()
{
d = 5 * d + 1 & 0xffff;
return d;
}
public void H(int l)
{
d = l;
}
public void C(int l)
{
e = new int[256];
f = new int[256];
for(int i1 = 0; i1 < 256; i1++)
{
e[i1] = i1;
f[i1] = i1;
}
H(Math.abs(l));
for(int j1 = 0; j1 < 500; j1++)
{
int k1 = (255 * F()) / 65535 + 1;
int i2;
for(i2 = (255 * F()) / 65535 + 1; i2 == k1; i2 = (255 * F()) / 65535 + 1);
if(k1 > 255)
k1 = 0;
if(i2 > 255)
i2 = 0;
int j2 = f[k1];
int k2 = f[i2];
f[k1] = k2;
f[i2] = j2;
}
g = new Hashtable(258);
for(int l1 = 0; l1 < 256; l1++)
g.put(new Integer(f[l1]), new Integer(l1));
}
public String K(String s)
{
int l = s.length();
byte abyte0[] = new byte[l];
byte abyte1[] = new byte[l];
s.getBytes(0, l, abyte0, 0);
for(int i1 = 0; i1 < l; i1++)
{
byte byte0 = abyte0[i1] < 0 ? (byte)(abyte0[i1] + 256) : abyte0[i1];
byte0 = (byte)((Integer)g.get(new Integer(byte0))).intValue();
byte0 += (10 * F()) / 65535;
if(byte0 > 255)
byte0 -= 256;
abyte1[i1] = byte0;
}
return new String(abyte1, 0);
}
public synchronized void E(int l)
{
C(l);
d = l;
}
public String G(String s)
{
return getParameter(s);
}
public void J(String s)
{
k = true;
do
{
showStatus(s);
try
{
Thread.sleep(200L);
}
catch(InterruptedException _ex) { }
} while(true);
}
public dissolvemenu()
{
T = false;
k = true;
}
private Thread A;
private Font B;
private Image C;
private Image D;
private int E;
private int F;
private int G;
private int H;
private int I;
private int J;
private int K;
private int L;
private int M;
private int N;
private int O;
private String P;
private String Q;
private long R;
private boolean S;
private boolean U;
private Graphics V;
private Graphics W;
private String X[];
private String Y[][];
private String Z[][];
private Image a[];
private Image b[];
private Image c[][];
private int d;
private int e[];
private int f[];
private Hashtable g;
private Hashtable h;
private Vector i;
private Vector j;
private boolean T;
private boolean k;