Advertisement
builderman_build

Untitled

Jul 7th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.95 KB | None | 0 0
  1. writeMenu()
  2. {
  3. if(isDefined(self.menu["sub"]))
  4. {
  5. if(self.menu["animateMenu"])
  6. {
  7. self.menu["UI"]["Title"] thread hudMoveY(self.menu["UI"]["Title"].y-100,.3);
  8. self.menu["UI"]["Status"] thread hudMoveY(self.menu["UI"]["Status"].y+100,.3);
  9. self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,225);
  10.  
  11. self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x+self.menu["title_x"],self.menu["UI"]["Title"].y,10,0,self.menu["main"]["title"],self.menu["Title & Status_Color"]);
  12. self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,0,"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
  13. self.menu["OPT"]["Title"] setText(level.patch);
  14. self thread KRDR(self.menu["KRDR_Color"],self.menu["OPT"]["Title"],level.patch);
  15. for(a=0;a<5;a++)
  16. {
  17. number = revaluePointer(self.menu[self getCurrentMenu()+"_POINTER"]-2+a);
  18. if(!isDefined(self buildFromMenu()["main"]["option"][number])) continue;
  19. self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"],self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
  20. self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,1,self buildFromMenu()[self getCurrentMenu()]["option"][number],self.menu["Menu_Color"]);
  21. if(a == 2) continue;
  22. self.menu["UI"][number] thread hudMoveY(self.menu["positioning_Y"]-70+35*a,.3);
  23. self.menu["OPT"][number] thread hudMoveY(self.menu["UI"][number].y,.3);
  24. }
  25. self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+self.menu["width"]-20,self.menu["positioning_Y"],2,1,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],5,1);
  26. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,20);
  27. wait .25;
  28. self.menu["OPT"]["Title"] thread hudFade(self.menu["Title & Status_Alpha"],.4);
  29. self.menu["OPT"]["Status"] thread hudFade(self.menu["Title & Status_Alpha"],.4);
  30. }
  31. else
  32. {
  33. self.menu["UI"]["Title"] thread hudMoveY(self.menu["UI"]["Title"].y-101,.4);
  34. self.menu["UI"]["Status"] thread hudMoveY(self.menu["UI"]["Status"].y+101,.4);
  35. wait .45;
  36. self.menu["UI"]["Edging"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x-0,self.menu["positioning_Y"],1,236,self.menu["Edging_Color"],self.menu["Edging_Shader"],-10,self.menu["Edging_Alpha"]);
  37. self.menu["UI"]["Edging"] thread hudScaleOverTime(.4,self.menu["width"]+2,236); wait .2;
  38. self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"],1,173,self.menu["Background_Color"],self.menu["Background_Shader"],5,self.menu["Background_Alpha"]);
  39. wait .25;
  40. self.menu["UI"]["Background"] thread hudScaleOverTime(.4,self.menu["width"],173); wait .4;
  41.  
  42. self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x-80,self.menu["UI"]["Title"].y,10,0,self.menu["main"]["title"],self.menu["Title & Status_Color"]);
  43. self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,0,"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
  44. self.menu["OPT"]["Title"] thread hudFade(self.menu["Title & Status_Alpha"],.15);
  45. self.menu["OPT"]["Status"] thread hudFade(self.menu["Title & Status_Alpha"],.15);
  46. self.menu["OPT"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x+self.menu["title_x"],.5);
  47. self.menu["OPT"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x+self.menu["title_x"],.5);
  48. wait .15;
  49. self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x,self.menu["positioning_Y"],2,1,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],6,self.menu["Scroller_Alpha"]);
  50. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.4,2,30);
  51. self thread drawText(self.menu["UI"]["Background"].x,0,true);
  52. wait .15;
  53. }
  54. }
  55. else
  56. self drawText(self.menu["UI"]["Background"].x,0);
  57. }
  58.  
  59. createFullMenu()
  60. {
  61. if(self.menu["animateMenu"])
  62. {
  63. self.menu["UI"]["Title"] = self createRectangle("LEFT","LEFT",self.menu["safeArea_X"],self.menu["positioning_Y"]-100,self.menu["width"],25,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
  64. self.menu["UI"]["Status"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"]+100,self.menu["width"],25,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
  65. self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x+9,self.menu["positioning_Y"],self.menu["width"]-18,225,self.menu["Background_Color"],self.menu["Background_Shader"],2,self.menu["Background_Alpha"]);
  66. }
  67. else
  68. {
  69. self.menu["UI"]["Title"] = self createRectangle("LEFT","LEFT",self.menu["safeArea_X"],self.menu["positioning_Y"]-101,self.menu["width"],30,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
  70. self.menu["UI"]["Status"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"]+101,self.menu["width"],30,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
  71. self.menu["UI"]["Edging"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x-0,self.menu["positioning_Y"],self.menu["width"]+2,236,self.menu["Edging_Color"],self.menu["Edging_Shader"],-10,self.menu["Edging_Alpha"]);
  72. self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"],self.menu["width"],173,self.menu["Background_Color"],self.menu["Background_Shader"],5,self.menu["Background_Alpha"]);
  73. }
  74. self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x+self.menu["title_x"],self.menu["UI"]["Title"].y,10,self.menu["Title & Status_Alpha"],self.menu["main"]["title"],self.menu["Title & Status_Color"]);
  75. self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,self.menu["Title & Status_Alpha"],"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
  76. if(self.menu["animateMenu"])
  77. {
  78. self.menu["OPT"]["Title"] setText(level.patch);
  79. self thread KRDR(self.menu["KRDR_Color"],self.menu["OPT"]["Title"],level.patch);
  80. for(a=0;a<5;a++)
  81. {
  82. number = revaluePointer(self.menu[self getCurrentMenu()+"_POINTER"]-2+a);
  83. self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"]-70+35*a,self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
  84. self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["UI"][number].y,5,1,self buildFromMenu()[self getCurrentMenu()]["option"][number],self.menu["Menu_Color"]);
  85. }
  86. }
  87. if(!self.menu["animateMenu"])
  88. self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x,self.menu["positioning_Y"],2,30,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],6,self.menu["Scroller_Alpha"]);
  89. else
  90. self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+self.menu["width"]-20,self.menu["positioning_Y"],2,20,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],5,1);
  91. if(!self.menu["animateMenu"])
  92. {
  93. self thread drawText(self.menu["UI"]["Background"].x,self.menu["Menu_Alpha"]);
  94. wait .15;
  95. }
  96. }
  97.  
  98. newOpen(menu)
  99. {
  100. self.menu["DISABLE_MENU_CONTROLS"] = true;
  101. if(!isDefined(self.menu["sub"]))
  102. {
  103. self thread continueKRDR();
  104. self.menu["UI"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x+(self.menu["width"]-3),.3);
  105. self.menu["UI"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x,.3);
  106. self.menu["OPT"]["Title"] thread hudMoveX(self.menu["OPT"]["Title"].x+(self.menu["width"]-3),.3);
  107. self.menu["OPT"]["Status"] thread hudMoveX(self.menu["OPT"]["Title"].x,.3);
  108.  
  109. self scrollPreLoads(100,75,4,3);
  110. self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,20);
  111. for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
  112. {
  113. if(a == self revaluePointer(self getPointer())) continue;
  114. self.menu["UI"][a] thread hudMoveY(self.menu["positioning_Y"],.3);
  115. self.menu["OPT"][a] thread hudMoveY(self.menu["UI"][a].y,.3);
  116. self.menu["UI"][a] thread hudFadenDestroy(self.menu["UI"][a].y,1);
  117. self.menu["OPT"][a] thread hudFadenDestroy(self.menu["UI"][a].y,.3);
  118. }
  119. self.menu["UI"]["Tab"] = self.menu["UI"][self revaluePointer(self getPointer())];
  120. self.menu["OPT"][self revaluePointer(self getPointer())] destroy();
  121. self setCurrentMenu(menu);
  122. self.menu["TITLE"] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],"CENTER","LEFT",self.menu["UI"]["Background"].x+((self.menu["width"]-18)/2),self.menu["positioning_Y"],5,self.menu["Menu_Alpha"],self buildFromMenu()[self getCurrentMenu()]["title"],self.menu["Menu_Color"]);
  123.  
  124. self.menu["UI"]["Scroller"] thread hudFade(self.menu["Scroller_Alpha"],1);
  125. self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+self.menu["width"]-12,.2); wait .2;
  126. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,180); wait .34;
  127. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,self.menu["width"],180); wait .3;
  128. self.menu["sub"] = true;
  129. self writeMenu(); wait .1;
  130. }
  131. else
  132. {
  133. self scrollPreLoads(102,70,3,2,true);
  134. self thread destroyMenu();
  135.  
  136. self.menu["UI"]["Scroller"] thread hudFade(1,1);
  137. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,180); wait .34;
  138. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,20); wait .2;//.3
  139. //self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+127,.2);
  140.  
  141. self thread continueKRDR();
  142. self.menu["UI"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x-(self.menu["width"]-3),.3);
  143. self.menu["UI"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x,.3);
  144. self.menu["OPT"]["Title"] thread hudMoveX(self.menu["OPT"]["Title"].x-(self.menu["width"]-3),.3);
  145. self.menu["OPT"]["Status"] thread hudMoveX(self.menu["OPT"]["Title"].x,.3);
  146.  
  147. self setCurrentMenu(menu);//Needed for revaluePointer() function
  148. self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,173);
  149. for(a=0;a<5;a++)
  150. {
  151. number = revaluePointer(self.menu["main_POINTER"]-2+a);
  152. if(a == 2 || !isDefined(self buildFromMenu()["main"]["option"][number])) continue;
  153. self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"],self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
  154. self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,0,self buildFromMenu()["main"]["option"][number],self.menu["Menu_Color"]);
  155. self.menu["OPT"][number] thread hudFade(self.menu["Menu_Alpha"],.3);
  156. self.menu["UI"][number] thread hudMoveY(self.menu["positioning_Y"]-70+35*a,.3);
  157. self.menu["OPT"][number] thread hudMoveY(self.menu["UI"][number].y,.3);
  158. }
  159. self.menu["TITLE"] destroy();
  160. self.menu["UI"][self revaluePointer(self getPointer())] = self.menu["UI"]["Tab"];
  161. self.menu["OPT"][self revaluePointer(self getPointer())] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,self.menu["Menu_Alpha"],self buildFromMenu()[self getCurrentMenu()]["option"][self revaluePointer(self getPointer())],self.menu["Menu_Color"]);
  162. self.menu["sub"] = undefined; wait .1;
  163. self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+(self.menu["width"]-20),.2); wait .1;
  164. }
  165. self.menu["DISABLE_MENU_CONTROLS"] = undefined;
  166. }
  167.  
  168. //USED FOR WHEN A PLAYER CHANGES ANOTHER STATUS (AND THEY ARE INSIDE OF THE ANIMATED MENU DESIGN)
  169. animatedMenuRefresh()
  170. {
  171. for(a=0;a<18;a++)
  172. {
  173. self.menu["UI"][a] destroy();
  174. self.menu["OPT"][a] destroy();
  175. }
  176. for(a=0;a<5;a++)
  177. {
  178. number = revaluePointer(self.menu["main_POINTER"]-2+a);
  179. if(!isDefined(self buildFromMenu()["main"]["option"][number])) continue;
  180. self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"]-70+35*a,self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
  181. self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["UI"][number].y,5,self.menu["Menu_Alpha"],self buildFromMenu()["main"]["option"][number],self.menu["Menu_Color"]);
  182. }
  183. }
  184.  
  185. exitMenu()
  186. {
  187. self thread forgeExit();
  188. if(!self inMenu()) return;
  189. self notify("menuExit");
  190.  
  191. if(!self.menu["hideMenu"])
  192. {
  193. if(self.menu["animateMenu"])
  194. {
  195. self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,20);
  196. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,1);
  197. self thread continueKRDR();
  198. self.menu["UI"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.3);
  199. self.menu["UI"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.3);
  200. self.menu["OPT"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.3);
  201. self.menu["OPT"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.3);
  202. self.menu["OPT"]["Title"] thread hudFadenDestroy(0,.4);
  203. self.menu["OPT"]["Status"] thread hudFadenDestroy(0,.4);
  204.  
  205. self.menu["OPT"][self getPointer()] thread hudFade(0,.25);
  206. for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
  207. {
  208. if(a == self revaluePointer(self getPointer())) continue;
  209. self.menu["UI"][a] thread hudMoveY(self.menu["positioning_Y"],.25);
  210. self.menu["OPT"][a] thread hudMoveY(self.menu["positioning_Y"],.25);
  211. self.menu["UI"][a] thread hudFadenDestroy(0,1);
  212. self.menu["OPT"][a] thread hudFadenDestroy(0,.4);
  213. }
  214. wait .34;
  215. }
  216. else
  217. {
  218. self.menu["OPT"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x-80,.35);
  219. self.menu["OPT"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x-80,.35);
  220. self.menu["OPT"]["Title"] thread hudFadenDestroy(0,.3);
  221. self.menu["OPT"]["Status"] thread hudFadenDestroy(0,.3);
  222. for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
  223. self.menu["OPT"][a] thread hudFadenDestroy(0,.3);
  224. self.menu["UI"]["Scroller"] thread hudScaleOverTime(.4,2,1);
  225. self.menu["UI"]["Scroller"] thread destroyAfter(.3);
  226. wait .35;
  227.  
  228. self.menu["UI"]["Background"] thread hudScaleOverTime(.4,1,173);
  229. self.menu["UI"]["Background"] thread destroyAfter(.45);
  230. wait .4;
  231. self.menu["UI"]["Edging"] thread hudScaleOverTime(.4,1,236);
  232. self.menu["UI"]["Edging"] thread destroyAfter(.45);
  233. wait .45;
  234.  
  235. self.menu["UI"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.4);
  236. self.menu["UI"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.4);
  237. wait .5;
  238. }
  239. }
  240. self.menu["IN_MENU"] = undefined;
  241. self instructions();
  242. self destroyAll(self.menu["UI"]);
  243. self destroyAll(self.menu["OPT"]);
  244. if(self.menu["hideMenu"]) wait .25;
  245. self thread startMenu();
  246. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement