Jump to content
  • 0
Sign in to follow this  
evilguyme

How do i a add close button to interface

Question

hey guys,
so i want to add a close window text button on the top right corner of the items kept on death interface.

this is my code:
[CODE]
public static void itemsOnDeath(RSFont[] wid) {
RSInterface rsinterface = addInterface(17100);
addSprite(17101, 0, 0); //17101,2,2
addHover(17102, 3, 0, 10601, 1, "Interfaces/Equipment/SPRITE", 17, 17, "Close Window");
addHovered(10601, 3, "Interfaces/Equipment/SPRITE", 17, 17, 10602);
addText(17103, "Items Kept On Death", wid, 2, 0xff981f);
addText(17104, "Items you will keep on death (if not skulled):", wid, 1, 0xff981f);
addText(17105, "Items you will lose on death (if not skulled):", wid, 1, 0xff981f);
addText(17106, "Information", wid, 1, 0xff981f);
addText(17107, "Max items kept on death:", wid, 1, 0xffcc33);
addText(17108, "~ 3 ~", wid, 1, 0xffcc33);
rsinterface.scrollMax = 0;
rsinterface.interfaceShown = false;
rsinterface.children = new int[12]; rsinterface.childX = new int[12]; rsinterface.childY = new int[12];

rsinterface.children[0] = 17101; rsinterface.childX[0] = 7; rsinterface.childY[0] = 8;
rsinterface.children[1] = 17102; rsinterface.childX[1] = 480; rsinterface.childY[1] = 17;
rsinterface.children[2] = 17103; rsinterface.childX[2] = 185; rsinterface.childY[2] = 18;
rsinterface.children[3] = 17104; rsinterface.childX[3] = 22; rsinterface.childY[3] = 50;
rsinterface.children[4] = 17105; rsinterface.childX[4] = 22; rsinterface.childY[4] = 110;
rsinterface.children[5] = 17106; rsinterface.childX[5] = 347; rsinterface.childY[5] = 47;
rsinterface.children[6] = 17107; rsinterface.childX[6] = 349; rsinterface.childY[6] = 270;
rsinterface.children[7] = 17108; rsinterface.childX[7] = 398; rsinterface.childY[7] = 298;
rsinterface.children[8] = 17115; rsinterface.childX[8] = 348; rsinterface.childY[8] = 64;
rsinterface.children[9] = 10494; rsinterface.childX[9] = 26; rsinterface.childY[9] = 74;
rsinterface.children[10] = 10600; rsinterface.childX[10] = 26; rsinterface.childY[10] = 133;
rsinterface.children[11] = 10601; rsinterface.childX[11] = 480; rsinterface.childY[11] = 17;
}
[/CODE]

so basically the problem is that the close button is there on the top right corner and it works, only thing is you cant see it because there is no text saying ''close window' or no 'x' button.
also another problem is all the addtext commands are not working, as in you just cant see any text on the interface, could that be the problem?

Thanks for any help :)

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Sign in to follow this  

×