Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 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(interfaceId); //main interface display
  10.  
  11. addSpriteLoader(interfaceId + index++, 1167); //main sprite
  12. RSInterface.addText(interfaceId + index++, "Shop History", tda, 2, 0xff981f, true);
  13.  
  14. addHoverButtonWSpriteLoader(interfaceId + index++, 65, 16, 16, "Close Window", 0, interfaceId + index, 3);
  15. addHoveredImageWSpriteLoader(interfaceId + index++, 66, 16, 16, interfaceId + index++);
  16.  
  17. RSInterface historyList = RSInterface.addInterface(historyListId); index++; //history list scroll
  18.  
  19. mainInterface.totalChildren(index - 2);
  20.  
  21. index = 0;
  22. mainInterface.child(index++, interfaceId + index, baseX, baseY); //background
  23. mainInterface.child(index++, interfaceId + index, baseX + (432 / 2), baseY + 8); //title
  24.  
  25. mainInterface.child(index++, interfaceId + index, baseX + 408, baseY + 7); //close
  26. mainInterface.child(index++, interfaceId + index, baseX + 408, baseY + 7); //close hover
  27.  
  28. mainInterface.child(index++, historyListId, 4 + baseX, 29 + baseY); //history list
  29.  
  30. /*
  31. * History list
  32. */
  33. int totalHistory = 30;
  34. historyList.width = 405;
  35. historyList.height = 240;
  36. historyList.scrollMax = totalHistory * 25 + 5;
  37.  
  38. historyList.totalChildren(totalHistory * 2);
  39.  
  40. historyListId++;
  41.  
  42. index = 0;
  43.  
  44. int increaseY = 0;
  45. for (int i = 0; i < totalHistory; i++) {
  46.  
  47. RSInterface.addText(historyListId, " ", tda, 2, 0xc8aa64, true);
  48. historyList.child(index++, historyListId++, (405 / 2), 7 + increaseY + 3);
  49. increaseY += 20;
  50.  
  51. addRectangle(historyListId, 405, -1, 0x000000, 200, false);
  52. historyList.child(index++, historyListId++, 0, 7 + increaseY + 3);
  53. increaseY += 10;
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement