Thread: How do I make hover buttons on ruse source?

Results 1 to 4 of 4
  1. #1 How do I make hover buttons on ruse source? 
    Registered Member
    Join Date
    Aug 2016
    Posts
    150
    Thanks given
    63
    Thanks received
    14
    Rep Power
    22
    HeY ive tried doing it like this,

    addHoverSpriteLoaderButton(51104, 1012, 99, 32, "Teleport to boss", -1, 51105, 1);
    addHoveredSpriteLoaderButton(51105, 99, 32 , 51106, 1013 );
    stll it wont make the button hower.
    setBounds(51104, 170, 180, 3, rsInterface);
    setBounds(51105, 170, 180, 4, rsInterface);
    setBounds(51107, 25, 62, 5, rsInterface);
    etc.
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    Make sure that 1012 and 1013 are different sprites
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2016
    Posts
    150
    Thanks given
    63
    Thanks received
    14
    Rep Power
    22
    Quote Originally Posted by goody View Post
    Make sure that 1012 and 1013 are different sprites


    They are both different sprites
    Reply With Quote  
     

  4. #4  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    addHoverButton
    Code:
    public static void addHoverButton(int interfaceId, int spriteId, int width, int height, String text, int contentType, int hoverOver, int actionType) {
    		// hoverable button
    		RSInterface tab = addTabInterface(interfaceId);
    		tab.id = interfaceId;
    		tab.parentID = interfaceId;
    		tab.type = 5;
    		tab.atActionType = actionType;
    		tab.contentType = contentType;
    		tab.opacity = 0;
    		tab.hoverType = hoverOver;
    
    		if (spriteId >= 0) {
    			tab.sprite1 = Client.cacheSprite[spriteId];
    			tab.sprite2 = Client.cacheSprite[spriteId];
    		}
    
    		tab.width = width;
    		tab.height = height;
    		tab.tooltip = text;
    	}
    	
    	public static void addHoverButton(int i, int disabledSprite,
    			int enabledSprite, int width, int height, String text,
    			int contentType, int hoverOver, int aT) {// hoverable
    		// button
    		RSInterface tab = addTabInterface(i);
    		tab.id = i;
    		tab.parentID = i;
    		tab.type = 5;
    		tab.atActionType = aT;
    		tab.contentType = contentType;
    		tab.opacity = 0;
    		tab.hoverType = hoverOver;
    		tab.sprite1 = Client.cacheSprite[disabledSprite];
    		tab.sprite2 = Client.cacheSprite[enabledSprite];
    		tab.width = width;
    		tab.height = height;
    		tab.tooltip = text;
    	}
    addHoveredButton
    Code:
    public static void addHoveredButton(int i, int disabledSprite,
    			int enabledSprite, int w, int h, int IMAGEID) {
    		RSInterface tab = addTabInterface(i);
    		tab.parentID = i;
    		tab.id = i;
    		tab.type = 0;
    		tab.atActionType = 0;
    		tab.width = w;
    		tab.height = h;
    		tab.interfaceShown = true;
    		tab.opacity = 0;
    		tab.hoverType = -1;
    		tab.scrollMax = 0;
    		addHoverImage(IMAGEID, disabledSprite, enabledSprite);
    		tab.totalChildren(1);
    		tab.child(0, IMAGEID, 0, 0);
    	}
    
    	public static void addHoveredButton(int i, int j, int w, int h, int IMAGEID) {
    		// hoverable button
    		RSInterface tab = addTabInterface(i);
    		tab.parentID = i;
    		tab.id = i;
    		tab.type = 0;
    		tab.atActionType = 0;
    		tab.width = w;
    		tab.height = h;
    		tab.interfaceShown = true;
    		tab.opacity = 0;
    		tab.hoverType = -1;
    		tab.scrollMax = 0;
    		addHoverImage(IMAGEID, j, j);
    		tab.totalChildren(1);
    		tab.child(0, IMAGEID, 0, 0);
    	}
    addHoverImage
    Code:
    private static void addHoverImage(int i, int j, int k) {
    		RSInterface tab = addTabInterface(i);
    		tab.id = i;
    		tab.parentID = i;
    		tab.type = 5;
    		tab.atActionType = 0;
    		tab.contentType = 0;
    		tab.width = 512;
    		tab.height = 334;
    		tab.opacity = 0;
    		tab.hoverType = 52;
    		tab.sprite1 = Client.cacheSprite[j];
    		tab.sprite2 = Client.cacheSprite[k];
    	}
    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

Similar Threads

  1. Replies: 7
    Last Post: 12-26-2010, 12:54 PM
  2. Replies: 1
    Last Post: 10-17-2010, 09:43 PM
  3. How do I make prayers work on NPCs?
    By ~pro// in forum Help
    Replies: 3
    Last Post: 07-06-2010, 03:50 AM
  4. how do i make myself owner on rscd v25
    By santapk1 in forum Help
    Replies: 0
    Last Post: 02-28-2010, 04:03 PM
  5. Replies: 1
    Last Post: 10-25-2009, 07:51 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •