[Only registered and activated users can see links. ]
Notice where it leaves an empty tab where summoning is now I believe?
I didn't like that, and I really hate summoning, so I decided to add a logout tab there.
So open up your client.java
First off, we need the array of the sideIcons to be big enough to hold this new sprite, find
Code:
newSideIcons = new Sprite[15];
Replace with
Code:
newSideIcons = new Sprite[16];
Now, find where it does the loop to load the sprites
Code:
for (int nSI = 0; nSI <= 14; nSI++) {
System.out.println("Loading icon without cache: " + nSI);
newSideIcons[nSI] = new Sprite("icon " + nSI);
}
After or before, add
Code:
newSideIcons[15] = new Sprite(streamLoader_2, "sideicons", 10);
Which loads the logout "door" from the cache.
Now to find where it actually draws the side icons, so find the method
Code:
drawSideIcons()
And just replace it with this, adds the logout door at the bottom
Code:
public void drawSideIcons() {
/* Top sideIcons */
if (tabInterfaceIDs[0] != -1)
newSideIcons[0].drawSprite(8, 8);
if (tabInterfaceIDs[1] != -1)
newSideIcons[1].drawSprite(37, 8);
if (tabInterfaceIDs[2] != -1)
newSideIcons[2].drawSprite(67, 8);
if (tabInterfaceIDs[14] != -1)
newSideIcons[3].drawSprite(97, 8);
if (tabInterfaceIDs[3] != -1)
newSideIcons[4].drawSprite(127, 8);
if (tabInterfaceIDs[4] != -1)
newSideIcons[5].drawSprite(159, 8);
if (tabInterfaceIDs[5] != -1)
newSideIcons[6].drawSprite(187, 8);
if (tabInterfaceIDs[6] != -1)
newSideIcons[7].drawSprite(217, 8);
/* Bottom sideIcons */
if (tabInterfaceIDs[9] != -1) {
newSideIcons[8].drawSprite(38, 306);
}
if (tabInterfaceIDs[8] != -1)
newSideIcons[9].drawSprite(70, 306);
if (tabInterfaceIDs[7] != -1)
newSideIcons[13].drawSprite(97, 306);
if (tabInterfaceIDs[11] != -1)
newSideIcons[10].drawSprite(127, 306);
if (tabInterfaceIDs[12] != -1)
newSideIcons[11].drawSprite(157, 306);
if (tabInterfaceIDs[13] != -1)
newSideIcons[12].drawSprite(187, 306);
if (tabInterfaceIDs[15] != -1)
newSideIcons[14].drawSprite(216, 307);
if (tabInterfaceIDs[16] != -1)
newSideIcons[15].drawSprite(8, 302);
}
I won't add the server-sided part since there are so many different ways of doing it, but basically you set the sideIcon 16, to the logout interface id.