Guest User

Untitled

a guest
Mar 6th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.56 KB | None | 0 0
  1. //Draw the right click task bar
  2.  
  3. //////////////////////
  4. //Horizontal Sliders//
  5. //////////////////////
  6.  
  7. /////////
  8. //Go Here
  9. if point_distance(guix,guiy,1243,144) <= 22
  10. {
  11.     hor_slidetimer += 16
  12.    
  13.     //Draw the tooltip at different distances depending on hor_slidetimer
  14.     if hor_slidetimer < 226
  15.     {
  16.         //Draw horizontal slide
  17.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,122)
  18.     }
  19.     else
  20.     {
  21.         draw_sprite(spr_taskgui_hor_gohere,0,980,122)
  22.     }
  23. }
  24.  
  25. /////////
  26. //Get Wood
  27. else if point_distance(guix,guiy,1243,193) <= 22
  28. {
  29.     hor_slidetimer += 16
  30.    
  31.     //Draw the tooltip at different distances depending on hor_slidetimer
  32.     if hor_slidetimer < 226
  33.     {
  34.         //Draw horizontal slide
  35.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,171)
  36.     }
  37.     else
  38.     {
  39.         draw_sprite(spr_taskgui_hor_gohere,0,980,171)
  40.     }
  41. }
  42.  
  43. /////////
  44. //Get Stone
  45. else if point_distance(guix,guiy,1243,243) <= 22
  46. {
  47.     hor_slidetimer += 16
  48.    
  49.     //Draw the tooltip at different distances depending on hor_slidetimer
  50.     if hor_slidetimer < 226
  51.     {
  52.         //Draw horizontal slide
  53.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,220)
  54.     }
  55.     else
  56.     {
  57.         draw_sprite(spr_taskgui_hor_gohere,0,980,220)
  58.     }
  59. }
  60.  
  61. /////////
  62. //Get Food
  63. else if point_distance(guix,guiy,1243,292) <= 22
  64. {
  65.     hor_slidetimer += 16
  66.    
  67.     //Draw the tooltip at different distances depending on hor_slidetimer
  68.     if hor_slidetimer < 226
  69.     {
  70.         //Draw horizontal slide
  71.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,269)
  72.     }
  73.     else
  74.     {
  75.         draw_sprite(spr_taskgui_hor_gohere,0,980,269)
  76.     }
  77. }
  78.  
  79. /////////
  80. //Empty Inventory
  81. else if point_distance(guix,guiy,1243,341) <= 22
  82. {
  83.     hor_slidetimer += 16
  84.    
  85.     //Draw the tooltip at different distances depending on hor_slidetimer
  86.     if hor_slidetimer < 226
  87.     {
  88.         //Draw horizontal slide
  89.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,318)
  90.     }
  91.     else
  92.     {
  93.         draw_sprite(spr_taskgui_hor_gohere,0,980,318)
  94.     }
  95. }
  96.  
  97. /////////
  98. //Bury Dead
  99. else if point_distance(guix,guiy,1243,390) <= 22
  100. {
  101.     hor_slidetimer += 16
  102.    
  103.     //Draw the tooltip at different distances depending on hor_slidetimer
  104.     if hor_slidetimer < 226
  105.     {
  106.         //Draw horizontal slide
  107.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,367)
  108.     }
  109.     else
  110.     {
  111.         draw_sprite(spr_taskgui_hor_gohere,0,980,367)
  112.     }
  113. }
  114.  
  115. /////////
  116. //Return Home
  117. else if point_distance(guix,guiy,1243,439) <= 22
  118. {
  119.     hor_slidetimer += 16
  120.    
  121.     //Draw the tooltip at different distances depending on hor_slidetimer
  122.     if hor_slidetimer < 226
  123.     {
  124.         //Draw horizontal slide
  125.         draw_sprite(spr_taskgui_hor_gohere,0,1206-hor_slidetimer,416)
  126.     }
  127.     else
  128.     {
  129.         draw_sprite(spr_taskgui_hor_gohere,0,980,416)
  130.     }
  131. }
  132. else
  133. {
  134.     hor_slidetimer = 0
  135. }
  136.  
  137. /////////////////////
  138. //Draw Task Options//
  139. /////////////////////
  140. if vert_slidetimer <= 400
  141. {      
  142.     //Draw the vertical task sliding down
  143.     vert_slidetimer += 16
  144.     draw_sprite(spr_taskgui_vertslide,0,1206,73-400+vert_slidetimer)
  145. }
  146. else
  147. {
  148.     draw_sprite(spr_taskgui_vertslide,0,1206,73);
  149. }
  150.  
  151. ///////////////////////////
  152. //Draw Hoizontal Cover-Up//
  153. ///////////////////////////
  154.  
  155. /////////////
  156. //Go Here
  157. if point_distance(guix,guiy,1243,144) <= 22 and hor_slidetimer >0
  158. {
  159.     //Draw cover up to make slide look like it's sliding out of task menu
  160.     draw_sprite(spr_gui_cover,0,1206,122)
  161. }
  162.  
  163. /////////////
  164. //Get Wood
  165. else if point_distance(guix,guiy,1243,193) <= 22 and hor_slidetimer >0
  166. {
  167.     draw_sprite(spr_gui_cover,0,1206,171)
  168. }
  169.  
  170. /////////////
  171. //Get Stone
  172. else if point_distance(guix,guiy,1243,243) <= 22 and hor_slidetimer >0
  173. {
  174.     draw_sprite(spr_gui_cover,0,1206,220)
  175. }
  176.  
  177. /////////////
  178. //Get Food
  179. else if point_distance(guix,guiy,1243,292) <= 22 and hor_slidetimer >0
  180. {
  181.     draw_sprite(spr_gui_cover,0,1206,269)
  182. }
  183.  
  184. /////////////
  185. //Empty Inventory
  186. else if point_distance(guix,guiy,1243,341) <= 22 and hor_slidetimer >0
  187. {
  188.     draw_sprite(spr_gui_cover,0,1206,318)
  189. }
  190.  
  191. /////////////
  192. //Bury Dead
  193. else if point_distance(guix,guiy,1243,390) <= 22 and hor_slidetimer >0
  194. {
  195.     draw_sprite(spr_gui_cover,0,1206,367)
  196. }
  197.  
  198. /////////////
  199. //Return Home
  200. else if point_distance(guix,guiy,1243,439) <= 22 and hor_slidetimer >0
  201. {
  202.     draw_sprite(spr_gui_cover,0,1206,416)
  203. }
  204.        
  205. //////////////////////
  206. //Draw Mouseover GUI//
  207. //////////////////////
  208.  
  209. draw_set_font (fnt_header);
  210. draw_sprite(spr_mouseover_friendly,0,980,0);
  211. draw_sprite(face_sprite,0,985,5);
  212.  
  213. draw_set_colour(c_white);
  214. draw_text(1080,10,string(name)); //Write name
  215.  
  216. //Hpbar
  217. hpbar = curhp/maxhp * 200
  218. draw_set_colour(c_black);
  219. draw_rectangle(1058,48,1262,67,0);//black
  220. draw_set_colour(c_white);
  221. draw_rectangle(1060,50,1260,65,0);//whitebackground
  222. draw_set_colour(c_red);
  223. draw_rectangle(1060,50,1060+hpbar,65,0);//redbar
  224.  
  225. draw_set_font (fnt_sm_display);//Set Font
  226.  
  227. draw_set_colour(c_black);
  228. draw_text(1065,49,string(curhp) + "/"+ string(maxhp));
  229.  
  230. if joy >= 75
  231. {
  232.     draw_sprite(spr_joy_green,0,1060,15);
  233. }
  234. else if joy < 75 and joy >= 25
  235. {
  236.     draw_sprite(spr_joy_yellow,0,1060,15);
  237. }
  238. else if joy < 25
  239. {
  240.     draw_sprite(spr_joy_red,0,1060,15);
  241. }
  242.  
  243. ///////////////
  244. //Handle Exit//
  245. ///////////////
  246. if keyboard_check (vk_escape) and click_timer > 15 and global.gui = 102
  247. {  
  248.     click_timer = 0;
  249.     global.gui = 0;
  250.     this_unit = 0;
  251.     vert_slidetimer = 0
  252.     //sound      
  253. }
Advertisement
Add Comment
Please, Sign In to add comment