|
Hi,
Looking to make a clickable sprite.
Here's my code:
Code:public static void addClickableSprites(int id, String tooltip, String path, int... spriteIds) { addSprites(id, path, spriteIds); RSInterface component = interfaceCache[id]; component.atActionType = 4; component.tooltip = tooltip; component.width = component.backgroundSprites[0].myWidth; component.height = component.backgroundSprites[0].myHeight; }The sprite shows, and when I click it the "66209" is printed, so it acknowledges I'm clicking it. - but the sprite doesn't change.Code:public static void newInterface(TextDrawingArea[] tda) { RSInterface widget = addInterface(62200); addSprite(62201, 1, "Interfaces/New/IMAGE"); addHoverButton(62202, "Interfaces/New/IMAGE", 3, 21, 21, "Close", -1, 62203, 3); addHoveredButton(62203, "Interfaces/New/Reward/IMAGE", 2, 21, 21, 62204); addSprite(62204, 4, "Interfaces/New/IMAGE"); addSprite(62205, 4, "Interfaces/New/IMAGE"); addSprite(62206, 4, "Interfaces/New/IMAGE"); addSprite(62207, 4, "Interfaces/New/IMAGE"); addSprite(62208, 4, "Interfaces/New/IMAGE"); addClickableSprites(62209, "Toggle", "Interfaces/New/IMAGE", 4, 5); setChildren(9, widget); setBounds(62201, 75, 30, 0, widget); setBounds(62202, 416, 36, 1, widget); setBounds(62203, 416, 36, 2, widget); setBounds(62204, 115, 115, 3, widget); setBounds(62205, 115, 155, 4, widget); setBounds(62206, 115, 195, 5, widget); setBounds(62207, 115, 235, 6, widget); setBounds(62208, 115, 275, 7, widget); setBounds(62209, 155, 275, 8, widget); }
I've tried it with numerous sprite paths and also different sprites but when I click it it doesn't change when clicked?
Any help?
No errors and I've copied exactly how it should be done when referring to current interfaces.
EDIT:
I have noticed that when pulling up the iron man interface an existing interface on this source using (::interface command) that those sprites don't change when clicked either. It is only upon log-in when you are presented with the interface as part of the tutorial that the sprites change. Interesting.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |