public static void playerOwnedShopInterface(TextDrawingArea[] tda) {
RSInterface tab = addInterface(32600);
RSInterface tab2 = addInterface(32620);
RSInterface tab3 = addInterface(32622);
String dir = "ok/ok";
addSprite(32601, 0, dir);
addConfigButton(32602, 32603, 3, 4, dir, 164, 22, "Search", 1, 4, 968);
addConfigButton(32604, 32605, 5, 6, dir, 164, 22, "Search for players", 1, 4, 969);
addHoverButton(32606, dir, 1, 16, 16, "Close Window", 250, 32607, 3);
addHoveredButton(32607, dir, 2, 16, 16, 32608);
addText(32610, "Player Owned Shops", tda, 2, 0xff7000, true, true);
addText(32611, "Search", tda, 1, 0xff7000, false, true);
addText(32612, "Search a player", tda, 1, 0xff7000, false, true);
int x = 10, y = 10;
tab.totalChildren(8);
tab.child(0, 32601, 0+x, 0+y);
tab.child(1, 32602, 87+x, 273+y);
//tab.child(2, 32604, 360+x, 273+y);
tab.child(2, 32606, 463+x, 4+y);
tab.child(3, 32607, 463+x, 4+y);
tab.child(4, 32611, 90+x, 276+y);
//tab.child(6, 32612, 363+x, 276+y);
tab.child(5, 32620, 9+x, 22+y);
tab.child(6, 32622, 350+x, 22+y);
tab.child(7, 32610, 242+x, 5+y);
tab2.width = 317;
tab2.height = 246;
tab2.scrollMax = 400;
itemGroup(32621, 7, 8, 10, 10);
tab2.totalChildren(1);
tab2.child(0, 32621, 14, 14);
for (int i = 0; i < 100; i++) {
addClickableText(32623 + i, "Player online " + i, "Select", tda, 0, 0xeb981f, false, true, 632);
}
tab3.width = 110;
tab3.height = 246;
tab3.scrollMax = 10 + (100 * 14);
tab3.totalChildren(100);
for (int i = 0; i < 100; i++) {
tab3.child(i, 32623 + i, 10, 10 + (i * 14));
}
}
public static void itemGroup(int id, int w, int h, int x, int y) {
RSInterface rsi = addInterface(id);
rsi.width = w;
rsi.height = h;
rsi.inv = new int[w * h];
rsi.invStackSizes = new int[w * h];
rsi.usableItemInterface = false;
rsi.isInventoryInterface = false;
rsi.invSpritePadX = x;
rsi.invSpritePadY = y;
rsi.spritesX = new int[20];
rsi.spritesY = new int[20];
rsi.sprites = new Sprite[20];
rsi.type = 2;
}
public static void addToItemGroup(int id, int w, int h, int x, int y, boolean actions, String action1, String action2, String action3) {
RSInterface rsi = addInterface(id);
rsi.width = w;
rsi.height = h;
rsi.inv = new int[w * h];
rsi.invStackSizes = new int[w * h];
rsi.usableItemInterface = false;
rsi.isInventoryInterface = false;
rsi.interfaceShown = false;
rsi.invSpritePadX = x;
rsi.invSpritePadY = y;
rsi.spritesX = new int[20];
rsi.spritesY = new int[20];
rsi.sprites = new Sprite[20];
rsi.actions = new String[5];
if (actions) {
rsi.actions[0] = action1;
rsi.actions[1] = action2;
rsi.actions[2] = action3;
}
rsi.type = 2;
}
static void playerOwnedShopInterface3(TextDrawingArea[] tda) {
RSInterface rsi = addInterface(37000);
addSprite(37001, 0, "Interfaces/ResourceBag/SPRITE");
addSprite(37002, 1, "Interfaces/ResourceBag/SPRITE");
for (int i = 0; i < 28; i++)
addToItemGroup(37003 + i, 1, 1, 0, 0, true, new String[] { "Withdraw 1", "Withdraw 5", "Withdraw 10", "Withdraw all", "Withdraw all to bank" });
setChildren(30, rsi);
setBounds(37001, 147, 38, 0, rsi);
setBounds(37002, 140, 31, 1, rsi);
int x = 0;
int y = 0;
int counter = 0;
for (int i = 0; i < 28; i++) {
setBounds(37003 + i, 162 + x, 46 + y, 2 + i, rsi);
x += 42;
counter++;
if (counter == 4) {
x = 0;
y += 34;
counter = 0;
}
}
RSInterface tab = addTabInterface(37053);
addInventoryItemGroup2(37054, 7, 4);
setChildren(1, tab);
setBounds(37054, 0, 0, 0, tab);
}
public static void addToItemGroup(int id, int w, int h, int x, int y, boolean hasActions, String[] actions) {
RSInterface rsi = addInterface(id);
rsi.width = w;
rsi.height = h;
rsi.inv = new int[w * h];
rsi.invStackSizes = new int[w * h];
rsi.usableItemInterface = false;
rsi.isInventoryInterface = false;
rsi.interfaceShown = false;
rsi.invSpritePadX = x;
rsi.invSpritePadY = y;
rsi.spritesX = new int[20];
rsi.spritesY = new int[20];
rsi.sprites = new Sprite[20];
if (hasActions)
rsi.actions = actions;
rsi.type = 2;
}
public static void addClickText(final int interfaceID, final String line,
final int color, final boolean center, final boolean shadow,
final int hover, final TextDrawingArea[] typeFace,
final int textType, final String tooltip) {
final RSInterface text = addInterface(interfaceID);
text.id = interfaceID;
text.parentID = interfaceID;
text.type = 4;
text.atActionType = 4;
text.contentType = 0;
text.width = /* typeFace[textType].getTextWidth(line) */130;
text.height = /* typeFace[textType].getTextHeight(line) */textType == 0 ? 14
: 21;
text.hoverType = hover;
text.centerText = center;
text.shadowed = shadow;
text.textDrawingAreas = typeFace[textType];
text.message = line;
text.enabledColor = color;
text.tooltip = tooltip;
}
public static void playerOwnedShopInterface2(TextDrawingArea[] tda) {
RSInterface localRSInterface1 = addInterface(33600);
RSInterface localRSInterface2 = addInterface(33620);
addSpriteLoader(33601, 581);
addHoveredImageWSpriteLoader(33606, 581, 164, 22, 33607);
addHoverSpriteLoaderButton(33607, 737, 16, 16, "Close", -1, 32608, 1);
addText(33610, "Your Player Owned Shop", tda, 2, 0xff7000, true, true);
localRSInterface1.totalChildren(5);
localRSInterface1.child(0, 33601, 10, 10);
localRSInterface1.child(1, 33606, 473, 14);
localRSInterface1.child(2, 33607, 473, 14);
localRSInterface1.child(3, 33620, 19, 32);
localRSInterface1.child(4, 33610, 252, 15);
localRSInterface2.width = 455;
localRSInterface2.height = 276;
localRSInterface2.scrollMax = 400;
itemGroup(33621, 10, 8, 10, 10);
localRSInterface2.totalChildren(1);
localRSInterface2.child(0, 33621, 20, 14);
}
//addText(33610, "Your Player Owned Shop", tda, 2, 0xff7000, true, true);
private static void addButton(int ID, int type, int hoverID, int dS,
int eS, String NAME, int W, int H, String text, int configFrame,
int configId) {
RSInterface rsinterface = addInterface(ID);
rsinterface.id = ID;
rsinterface.parentID = ID;
rsinterface.type = 5;
rsinterface.atActionType = type;
rsinterface.opacity = 0;
rsinterface.hoverType = hoverID;
rsinterface.enabledSprite = imageLoader(dS, NAME);
rsinterface.disabledSprite = imageLoader(eS, NAME);
rsinterface.width = W;
rsinterface.height = H;
rsinterface.tooltip = text;
rsinterface.valueCompareType = new int[1];
rsinterface.requiredValues = new int[1];
rsinterface.valueCompareType[0] = 1;
rsinterface.requiredValues[0] = configId;
rsinterface.valueIndexArray = new int[1][3];
rsinterface.valueIndexArray[0][0] = 5;
rsinterface.valueIndexArray[0][1] = configFrame;
rsinterface.valueIndexArray[0][2] = 0;
}