This is a lot more efficant. Good work![]()
|
|

well. the way people use atm requires 3 methods...and uses like 4 ids. this way uses 1 id as usual and only 1 method.
add this type to your client.java
and and then make your button type 10.Code:if(class9_1.type == 10) { Sprite sprite = class9_1.sprite1; Sprite sprite2 = class9_1.sprite2; if(sprite != null) sprite.drawSprite(k2, l2); if(sprite2 != null && super.mouseX >= k2 && super.mouseX <= k2+class9_1.width && super.mouseY >= l2 && super.mouseY <= l2+class9_1.height) sprite2.drawSprite(k2, l2); }
How to use:
Sprite1 and Sprite2 in your addButton methods are the hover and non hover sprites
so:
Sprite1 = new Sprite("button");
Sprite2 = new Sprite("button_hover");

This is a lot more efficant. Good work![]()
More efficient, but I like using the original way; Sprite + mouseOverInterToTrigger, layer(mouseOvered content).


Then simply add these variables to RSInterface:Code:if(class9_1.type == 10) { Sprite sprite; Sprite sprite2; if(!interfaceIsSelected(class9_1)){ sprite = class9_1.sprite1; sprite2 = class9_1.hoverSprite1; }else{ sprite = class9_1.sprite2; sprite2 = class9_1.hoverSprite2; } if(sprite != null) sprite.drawSprite(k2, l2); if(sprite2 != null && super.mouseX >= k2 && super.mouseX <= k2+class9_1.width && super.mouseY >= l2 && super.mouseY <= l2+class9_1.height) sprite2.drawSprite(k2, l2); }
And initialize them in your Type 10 interface methods.Code:public Sprite hoverSprite1; public Sprite hoverSprite2;
| « Statius Warhammer and Vesta's Longsword Emote! [non-renamed] | New Quest Tab » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |