Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var oldCol, oldAlp;
  2. oldCol = draw_get_color();
  3. oldAlp = draw_get_alpha();
  4.  
  5.  
  6. //Menu
  7. if (phase >= 1 && phase <= 3) || phase == 5 || phase == 6
  8. {
  9.     draw_set_font(global.MM3font);
  10.    
  11.     //BG
  12.     draw_set_color(c_white);
  13.     draw_set_alpha(1);
  14.     draw_sprite(sprPauseMenuBG, 0, view_xview[0], view_yview[0]);
  15.    
  16.     //Life
  17.     draw_sprite(sprLifeNumber,global._lives,112,0);
  18.    
  19.     //Icons, ammo bars and names
  20.     var maxI;
  21.     if global.totalWeapons > 5 //a maximum of 6 weapons in the left column (0 is also a valid weapon ID, hence 5 instead of 6)
  22.         maxI = 5;
  23.     else
  24.         maxI = global.totalWeapons;
  25.        
  26.     //Left column
  27.     for(i = 0; i <= maxI; i += 1)
  28.     {
  29.         if global.weaponUnlocked[i] == true
  30.         {
  31.             //Ammo bar (Fix?)
  32.             var ammo;
  33.             if i == 0
  34.                 ammo = global._health;
  35.             else
  36.                 ammo = ceil(global.ammo[i]);
  37.  
  38.             //Icon
  39.             if (option == i and !iconFlash) or (option != i)
  40.             {
  41.                 draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
  42.                 draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+16+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
  43.             }
  44.            
  45.             //The life bar at the bottom left
  46.             if i == 0
  47.                 draw_sprite_ext(sprPauseMenuBarBig, global._health, view_xview[0]+56, view_yview[0]+0, 1, 1, 0, c_white, 1);
  48.         }
  49.     }
  50.    
  51.     //Right column (TODO)
  52.     if global.totalWeapons > 5
  53.     {
  54.         for(i = 0; i < global.totalWeapons-5; i += 1)
  55.         {
  56.             if global.weaponUnlocked[i+6] == true
  57.             {
  58.            
  59.                 //Ammo bar (TODO)
  60.                 var ammo;
  61.                 ammo = ceil(global.ammo[i+6]);
  62.                
  63.                 //Icon
  64.                 if (option == i+6 and !iconFlash) or (option != i+6)
  65.                 {
  66.                     draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
  67.                     draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+88+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
  68.                 }
  69.             }
  70.         }
  71.     }
  72.    
  73.     //E-Tank (TODO)
  74.     if option == global.totalWeapons+1
  75.     {
  76.         if iconFlash = false
  77.             draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
  78.         else
  79.             draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
  80.     }
  81.    
  82.     //M-Tank (TODO)
  83.     else if option == global.totalWeapons+2
  84.     {
  85.         if iconFlash = false
  86.             draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
  87.         else
  88.             draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
  89.     }
  90.    
  91.     draw_text(view_xview[0]+104, view_yview[0]+132,string(global.eTanks));
  92.     draw_text(view_xview[0]+136, view_yview[0]+132,string(global.mTanks));
  93. }
  94.  
  95.  
  96. //Black (MORE LIKE WHITE) rectangle
  97. draw_set_color(c_white);
  98. draw_set_alpha(blackAlpha);
  99. draw_rectangle(view_xview[0], view_yview[0], view_xview[0]+view_wview[0], view_yview[0]+view_hview[0], false);
  100.  
  101.  
  102. draw_set_color(oldCol);
  103. draw_set_alpha(oldAlp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement