Advertisement
Guest User

scr_DrawMenuScreen

a guest
Oct 14th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Variable for positioning
  2. screenCenterWidth = room_width div 2;
  3.  
  4. // Set text alignment and color.
  5. draw_set_color(c_white);
  6. draw_set_halign(fa_center);
  7. draw_set_valign(fa_middle);
  8.  
  9. // Loops through each of the buttons. The loop checks to see if it's within the amount of buttons we have defined.
  10. for (i = 0; i < startChoices; i++) {
  11.     var subImage;
  12.     if selectedChoice == i {
  13.         if keyboard_check(global.buttonAccept)
  14.             subImage = 2;
  15.         else
  16.             subImage = 1;
  17.     }
  18.     else subImage = 0;
  19.     draw_sprite(spr_MenuButton, subImage, screenCenterWidth, 64 * (i +1));
  20.    
  21.  
  22.     draw_text(screenCenterWidth, 64 * (i + 1), startChoiceArray[i]);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement