Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
73
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.             //Icon
  32.             if (option == i and !iconFlash) or (option != i)
  33.             {
  34.                 draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
  35.             }
  36.                
  37.             //Ammo bar (Fix?)
  38.             var ammo;
  39.             if i == 0
  40.                 ammo = global._health;
  41.             else
  42.                 ammo = ceil(global.ammo[i]);
  43.                
  44.             if option == i
  45.                 draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+16+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
  46.             //else
  47.                 //draw_sprite_ext(sprPauseMenuBarGray, ammo, view_xview[0]+32+32, view_yview[0]+24+i*19+8, 1, 1, 0, c_white, 1);
  48.            
  49.             //The life bar at the bottom left
  50.             if i == 0
  51.                 draw_sprite_ext(sprPauseMenuBarBig, global._health, view_xview[0]+56, view_yview[0]+0, 1, 1, 0, c_white, 1);
  52.         }
  53.     }
  54.    
  55.     //Right column (TODO)
  56.     if global.totalWeapons > 5
  57.     {
  58.         for(i = 0; i < global.totalWeapons-5; i += 1)
  59.         {
  60.             if global.weaponUnlocked[i+6] == true
  61.             {
  62.                 //Icon
  63.                 if (option == i+6 and !iconFlash) or (option != i+6)
  64.                 {
  65.                     draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
  66.                 }
  67.                    
  68.                 //Ammo bar (TODO)
  69.                 var ammo;
  70.                 ammo = ceil(global.ammo[i+6]);
  71.                    
  72.                 if option == i+6
  73.                     draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+88+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
  74.                 //else
  75.                     //draw_sprite_ext(sprPauseMenuBarGray, ammo, view_xview[0]+88+32, view_yview[0]+24+i*19+8, 1, 1, 0, c_white, 1);
  76.             }
  77.         }
  78.     }
  79.    
  80.     //E-Tank (TODO)
  81.     if option == global.totalWeapons+1
  82.     {
  83.         if iconFlash = false
  84.             draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
  85.         else
  86.             draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
  87.     }
  88.    
  89.     //M-Tank (TODO)
  90.     else if option == global.totalWeapons+2
  91.     {
  92.         if iconFlash = false
  93.             draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
  94.         else
  95.             draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
  96.     }
  97.    
  98.     draw_text(view_xview[0]+104, view_yview[0]+132,string(global.eTanks));
  99.     draw_text(view_xview[0]+136, view_yview[0]+132,string(global.mTanks));
  100. }
  101.  
  102.  
  103. //Black (MORE LIKE WHITE) rectangle
  104. draw_set_color(c_white);
  105. draw_set_alpha(blackAlpha);
  106. draw_rectangle(view_xview[0], view_yview[0], view_xview[0]+view_wview[0], view_yview[0]+view_hview[0], false);
  107.  
  108.  
  109. draw_set_color(oldCol);
  110. draw_set_alpha(oldAlp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement