PDA

View Full Version : 317 Adding partially transparent context menus [NON]



demise
July 7th, 2010, 23:24
Seeing as my vps has been banned ive decided to release all of the things from my server and client.

This tutorial will allow you to add partially transparent context menus as shown in the picture below.
Only the registered members can see the link.

1. -
Search for the following in your client class

void method40

That is a method, now replace the entire method from the top bracket to the bottom bracket with this.

public final void method40(byte byte0)
{
int i = anInt949;
int j = anInt950;
int k = anInt951;
int l = anInt952;
int i1 = 0x5d5447;
Class30_Sub2_Sub1.transparentBox(l, j, i, i1, k, 0, 200);
if(byte0 == 9)
byte0 = 0;
else
return;
Class30_Sub2_Sub1.method336(16, j + 1, i + 1, 0, k - 2, 0);
Class30_Sub2_Sub1.method337(i + 1, k - 2, l - 19, 0, j + 18, true);
aClass30_Sub2_Sub1_Sub4_1272.method385(i1, "Choose Option", j + 14, 822, i + 3);
int j1 = super.anInt20;
int k1 = super.anInt21;
if(anInt948 == 0)
{
j1 -= 4;
k1 -= 4;
}
if(anInt948 == 1)
{
j1 -= 553;
k1 -= 205;
}
if(anInt948 == 2)
{
j1 -= 17;
k1 -= 357;
}
for(int l1 = 0; l1 < anInt1133; l1++)
{
int i2 = j + 31 + (anInt1133 - 1 - l1) * 15;
int j2 = 0xffffff;
if(j1 > i && j1 < i + k && k1 > i2 - 13 && k1 < i2 + 3)
j2 = 0xffff00;
aClass30_Sub2_Sub1_Sub4_1272.method389(false, true, i + 3, j2, aStringArray1199[l1], i2);
}

}

2. -
Copy and paste this method into your class30_sub2_sub1 class

public static void transparentBox(int i, int j, int k, int l, int i1, int j1, int opac)
{
int j3 = 256 - opac;
if(k < anInt1383)
{
i1 -= anInt1383 - k;
k = anInt1383;
}
if(j < anInt1381)
{
i -= anInt1381 - j;
j = anInt1381;
}
if(k + i1 > anInt1384)
i1 = anInt1384 - k;
if(j + i > anInt1382)
i = anInt1382 - j;
int k1 = anInt1379 - i1;
int l1 = k + j * anInt1379;
if(j1 != 0)
anInt1374 = -374;
for(int i2 = -i; i2 < 0; i2++)
{
for(int j2 = -i1; j2 < 0; j2++){
int i3 = anIntArray1378[l1];
anIntArray1378[l1++] = ((l & 0xff00ff) * opac + (i3 & 0xff00ff) * j3 & 0xff00ff00) + ((l & 0xff00) * opac + (i3 & 0xff00) * j3 & 0xff0000) >> 8;
}
l1 += k1;
}

}

3. -
If you want to change the amount of transparency, simple change the number in this line of code

Class30_Sub2_Sub1.transparentBox(l, j, i, i1, k, 0, 200);

To higher or lower.

And your done! Enjoy.
Credits to whoever wants them, I don't remember how I did this before.
Much love and credits specifically to sanity for helping me rename and more!

icedice
July 8th, 2010, 02:36
nice. im going to try and convert it to a 508 client

elf run1
July 8th, 2010, 07:42
is this for the inv too :o? very nice btw ty

demise
July 8th, 2010, 15:43
is this for the inv too :o? very nice btw ty

Np, and if you want :L

Spear
July 8th, 2010, 15:50
Very nice, I was looking for this. :)

Dyon123
July 8th, 2010, 15:52
Wow, nice! I'll use this :o

Canownueasy`
July 8th, 2010, 17:01
Cool using right after convert to renamed :p

~ZaRoS
July 8th, 2010, 18:41
I'd rep if I could, this is awesome.

h1 sk1ller
July 9th, 2010, 07:01
Really Nice =}

0r4nge ownz
July 9th, 2010, 16:45
sweet, someone convert this to 508/525?
i would soo love you for ever! and appreciate it very much!

Charlie`
July 27th, 2010, 12:12
nice man i compla meant u

elf run1
August 4th, 2010, 04:57
sorry for the gravedig but, how would i make this work on the inv back.

0r4nge ownz
August 5th, 2010, 17:33
sorry for the gravedig but, how would i make this work on the inv back.

i dont think you could, i think you make inv transparent while you make the sprite.

elf run1
August 5th, 2010, 20:01
hm well ill still look for some way..

icedice
August 10th, 2010, 03:37
i dont think you could, i think you make inv transparent while you make the sprite.

ive tried that before and it doesn't work. it has to be done this same way

Richard1992
September 20th, 2010, 08:24
The transparency is called the Alpha