Advertisement
Guest User

Untitled

a guest
Jan 26th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. [PHP]function createSkillWindow() {
  2. new GuiControl("Skill_Window") {
  3. useownprofile = true;
  4. profile.border = 0;
  5.  
  6. width = 376;
  7. height = 428;
  8. x = (screenwidth - 376) / 2;
  9. y = 89;
  10.  
  11. //thiso.catchevent(this, "onMouseLeave", "mouseLeftGUI");
  12.  
  13. new GuiShowImgCtrl("Skill_Window_BG") {
  14. image = "roak_guiwindow_skills.png";
  15.  
  16. width = 376;
  17. height = 428;
  18. x = y = 0;
  19. }
  20.  
  21. // show multiline text box for images to allow scroll
  22. new GuiScrollCtrl("Skill_Window_Scroll") {
  23. profile = "";
  24. useownprofile = true;
  25. profile.border = 0;
  26.  
  27. hscrollbar = "alwaysOff";
  28. vscrollbar = "dynamic";
  29.  
  30. width = 310;
  31. height = 361;
  32. x = 48;
  33. y = 45;
  34. }
  35.  
  36. // show the selected weapon
  37. new GuiShowImgCtrl("Skill_Window_Close") {
  38. useownprofile = true;
  39. image = "roak_guiwindow_x.png";
  40.  
  41. width = 29;
  42. height = 30;
  43.  
  44. x = 344;
  45. y = 16;
  46.  
  47. //bringtofront();
  48. }
  49. }
  50. }
  51. [/PHP]
  52.  
  53. The image that eventually gets shown up
  54. [PHP]new GuiShowImgCtrl("Skill_Image_"@search_list[i]) {
  55. x = setX + 4;
  56. y = setY + 5;
  57. image = search_list[i].image;
  58. hint = search_list[i];
  59.  
  60. width = 65;
  61. height = getimgheight(search_list[i].image) + 30;
  62.  
  63. zoom = 1;
  64. alpha = 1;
  65. layer = 7;
  66.  
  67. thiso.catchevent(this, "onMouseEnter", "playHoverSnd");
  68. thiso.catchevent(this, "onMouseDragged", "dragItem");
  69. }[/PHP]
  70.  
  71. then it adds to the skill window scroll ctrl
  72. [PHP]// add the image to the scroll window
  73. Skill_Window_Scroll.addcontrol(@"Skill_Image_"@search_list[i]);[/PHP]
  74.  
  75. then the function for the zoom and sound on hover to be played.
  76. [PHP]function playHoverSnd(keymodifier, mousescreenx, mousescreeny) {
  77. // play the sound
  78. if (getOptionsVariable("sound")) play(this.clickSound);
  79. echo(keymodifier);
  80. // reset the hover img, so mouse over overrides
  81. (@this.holdBtn).zoom = 1;
  82.  
  83. // set the new active btn
  84. this.holdBtn = keymodifier;
  85. this.holdBtnImg = keymodifier.hint;
  86.  
  87. // set the alpha image to true
  88. (@this.holdBtn).zoom = 0.7;
  89. }[/PHP]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement