Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. public static void playerOwnedShopHistory(TextDrawingArea[] tda) {
  2. int baseX = 40;
  3. int baseY = 25;
  4.  
  5. int interfaceId = 50_500;
  6. int historyListId = 50_550;
  7. int index = 1;
  8.  
  9. RSInterface mainInterface = RSInterface.addInterface(50500); //main interface display
  10.  
  11. addSpriteLoader(50501, 1167); //main sprite 50501
  12. RSInterface.addText(50502, "Shop History", tda, 2, 0xff981f, true);
  13.  
  14. addHoverButtonWSpriteLoader(50503, 65, 16, 16, "Close Window", 0, 50504, 3);
  15. addHoveredImageWSpriteLoader(50504, 66, 16, 16, 50505);
  16. addHoverButtonWSpriteLoader(50506, 1037, 56, 18, "Select", -1, 50507, 1); //Change 1037 to nonhighlight id
  17. addHoveredImageWSpriteLoader(50507, 1038, 56, 18, 50508); //Change 1038 to highlight id
  18. addText(50509, "Home", tda, 0, 0xff7000, true, true);
  19. addHoverButtonWSpriteLoader(50510, 1037, 56, 18, "Select", -1, 50511, 1); //Change 1037 to nonhighlight id
  20. addHoveredImageWSpriteLoader(50511, 1038, 56, 18, 50512); //Change 1038 to highlight id
  21. addText(50513, "Back", tda, 0, 0xff7000, true, true);
  22.  
  23. RSInterface historyList = RSInterface.addInterface(historyListId); index++; //history list scroll
  24.  
  25. mainInterface.totalChildren(11);
  26.  
  27. index = 0;
  28. mainInterface.child(0, 50501, baseX, baseY); //background
  29. mainInterface.child(1, 50502, baseX + (432 / 2), baseY + 8); //title
  30.  
  31. mainInterface.child(2, 50503, baseX + 408, baseY + 7); //close
  32. mainInterface.child(3, 50504, baseX + 408, baseY + 7); //close hover
  33. mainInterface.child(4, 50506, baseX + 408, baseY + 7); //buttons
  34. mainInterface.child(5, 50507, baseX + 408, baseY + 7); //buttons
  35. mainInterface.child(6, 50509, baseX + 408, baseY + 7); //buttons
  36. mainInterface.child(7, 50510, baseX + 408, baseY + 7); //buttons
  37. mainInterface.child(8, 50511, baseX + 408, baseY + 7); //buttons
  38. mainInterface.child(9, 50513, baseX + 408, baseY + 7); //buttons
  39.  
  40. mainInterface.child(10, historyListId, 4 + baseX, 29 + baseY); //history list
  41.  
  42. /*
  43. * History list
  44. */
  45. int totalHistory = 30;
  46. historyList.width = 405;
  47. historyList.height = 240;
  48. historyList.scrollMax = totalHistory * 25 + 5;
  49.  
  50. historyList.totalChildren(totalHistory * 2);
  51.  
  52. historyListId++;
  53.  
  54. index = 0;
  55.  
  56. int increaseY = 0;
  57. for (int i = 0; i < totalHistory; i++) {
  58.  
  59. RSInterface.addText(historyListId, " ", tda, 2, 0xc8aa64, true);
  60. historyList.child(index++, historyListId++, (405 / 2), 7 + increaseY + 3);
  61. increaseY += 20;
  62.  
  63. addRectangle(historyListId, 405, -1, 0x000000, 200, false);
  64. historyList.child(index++, historyListId++, 0, 7 + increaseY + 3);
  65. increaseY += 10;
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement