Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oldCol, oldAlp;
- oldCol = draw_get_color();
- oldAlp = draw_get_alpha();
- //Menu
- if (phase >= 1 && phase <= 3) || phase == 5 || phase == 6
- {
- draw_set_font(global.MM3font);
- //BG
- draw_set_color(c_white);
- draw_set_alpha(1);
- draw_sprite(sprPauseMenuBG, 0, view_xview[0], view_yview[0]);
- //Life
- draw_sprite(sprLifeNumber,global._lives,112,0);
- //Icons, ammo bars and names
- var maxI;
- 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)
- maxI = 5;
- else
- maxI = global.totalWeapons;
- //Left column
- for(i = 0; i <= maxI; i += 1)
- {
- if global.weaponUnlocked[i] == true
- {
- //Ammo bar (Fix?)
- var ammo;
- if i == 0
- ammo = global._health;
- else
- ammo = ceil(global.ammo[i]);
- //Icon
- if (option == i and !iconFlash) or (option != i)
- {
- draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
- draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+16+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
- }
- //The life bar at the bottom left
- if i == 0
- draw_sprite_ext(sprPauseMenuBarBig, global._health, view_xview[0]+56, view_yview[0]+0, 1, 1, 0, c_white, 1);
- }
- }
- //Right column (TODO)
- if global.totalWeapons > 5
- {
- for(i = 0; i < global.totalWeapons-5; i += 1)
- {
- if global.weaponUnlocked[i+6] == true
- {
- //Ammo bar (TODO)
- var ammo;
- ammo = ceil(global.ammo[i+6]);
- //Icon
- if (option == i+6 and !iconFlash) or (option != i+6)
- {
- draw_sprite_ext(sprWeaponIcons, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+16+i*16, 1, 1, 0, c_white, 1);
- draw_sprite_ext(sprPauseMenuBar, ammo, view_xview[0]+88+24, view_yview[0]+16+8+i*16, 1, 1, 0, c_white, 1);
- }
- }
- }
- }
- //E-Tank (TODO)
- if option == global.totalWeapons+1
- {
- if iconFlash = false
- draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
- else
- draw_sprite_ext(sprPauseETank, global.weaponSlot[i], view_xview[0]+88, view_yview[0]+132, 1, 1, 0, c_white, 1);
- }
- //M-Tank (TODO)
- else if option == global.totalWeapons+2
- {
- if iconFlash = false
- draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
- else
- draw_sprite_ext(sprPauseMTank, global.weaponSlot[i], view_xview[0]+120, view_yview[0]+132, 1, 1, 0, c_white, 1);
- }
- draw_text(view_xview[0]+104, view_yview[0]+132,string(global.eTanks));
- draw_text(view_xview[0]+136, view_yview[0]+132,string(global.mTanks));
- }
- //Black (MORE LIKE WHITE) rectangle
- draw_set_color(c_white);
- draw_set_alpha(blackAlpha);
- draw_rectangle(view_xview[0], view_yview[0], view_xview[0]+view_wview[0], view_yview[0]+view_hview[0], false);
- draw_set_color(oldCol);
- draw_set_alpha(oldAlp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement