Thread: [GALKON] Logout Button, new tab

Results 1 to 7 of 7
  1. #1 [GALKON] Logout Button, new tab 
    i hazy i
    Guest
    Hello Everyone,

    First off, do this tutorial for the new tabs

    [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.

    I have this in my Server,

    Code:
     setSidebarInterface(16, 2449);
    I don't think I forgot anything.

    Credits
    100% Galkon for his awesome base.
    Reply With Quote  
     

  2. #2  
    Registered Member
    thing1's Avatar
    Join Date
    Aug 2008
    Posts
    2,014
    Thanks given
    128
    Thanks received
    1,008
    Rep Power
    2163
    1st post, looks pretty cool, good job
    Reply With Quote  
     

  3. #3  
    Registered Member slickey rickey's Avatar
    Join Date
    Nov 2009
    Posts
    111
    Thanks given
    0
    Thanks received
    0
    Rep Power
    2
    Nice.
    Reply With Quote  
     

  4. #4  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,881
    Thanks given
    1,854
    Thanks received
    4,741
    Rep Power
    5000
    Good job.



    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Oct 2009
    Age
    27
    Posts
    1,037
    Thanks given
    4
    Thanks received
    8
    Rep Power
    338
    Picture ?
    Reply With Quote  
     

  6. #6  
    #extreme

    +Deus Ex's Avatar
    Join Date
    Nov 2009
    Posts
    2,965
    Thanks given
    236
    Thanks received
    214
    Rep Power
    411
    Yeap picture would be great ;D
    Best regards,
    +Deus Ex
    Reply With Quote  
     

  7. #7  
    Registered Member
    Purple's Avatar
    Join Date
    Feb 2010
    Age
    26
    Posts
    2,799
    Thanks given
    467
    Thanks received
    260
    Rep Power
    312
    Quote Originally Posted by Bullet™ View Post
    Yeap picture would be great ;D
    It replaces the summoning tab to the logout tab instead.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •