Advertisement
Guest User

Untitled

a guest
Jun 8th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(currentArray = optionsArray){
  2.     if(global.useGamepad = false){
  3.         var w       = keyboard_check_pressed(global.up);
  4.         var s       = keyboard_check_pressed(global.down);
  5.         var a       = keyboard_check_pressed(global.left);
  6.         var d       = keyboard_check_pressed(global.right);
  7.         var enter   = keyboard_check_pressed(global.enter);
  8.     }
  9.     else if(global.useGamepad = true){
  10.         var w       = (gamepad_axis_value(0,global.moveUp) < 0);
  11.         var s       = (gamepad_axis_value(0,global.moveUp) > 0);
  12.         var a       = (gamepad_axis_value(0,global.moveRight) < 0);
  13.         var d       = (gamepad_axis_value(0,global.moveRight) > 0);
  14.         var enter   = (gamepad_button_check_pressed(0,global.contEnter));
  15.     }
  16.    
  17.    
  18.     var lineXmin,lineXmax,amount;
  19.     lineXmin= 640-60;
  20.     lineXmax= 640+60;
  21.     amount  = 1;
  22.    
  23.     //BAR VARIABLE CHANGES
  24.     //music bar change
  25.     ini_open("save.sav");
  26.    
  27.     if(enter && (selected = 0 || selected = 1)){
  28.         sliderInput = !sliderInput;
  29.        
  30.         if(sliderInput = true){if(!audio_is_playing(soMenuBlip)){audio_play_sound(soMenuBlip,80,false);}}
  31.         else if(sliderInput = false){if(!audio_is_playing(soMenuBackupBlip)){audio_play_sound(soMenuBackupBlip,80,false);}}
  32.     }
  33.    
  34.     if(selected = 0 && sliderInput = true){
  35.         col1 = c_white;
  36.         if(a){circle1X -= amount; ini_write_real("Options","Music Volume",60); audio_group_set_gain(agrMusic,(circle1X/120),1);}
  37.         if(d){circle1X += amount; ini_write_real("Options","Music Volume",60); audio_group_set_gain(agrMusic,(circle1X/120),1);}   
  38.     }
  39.    
  40.     //sound bar change
  41.     else if(selected = 1 && sliderInput = true){
  42.         col2 = c_white;
  43.         if(a){circle2X -= amount; ini_write_real("Options","Sound Volume",60); audio_group_set_gain(agrSFX,(circle2X/120),1);if(!audio_is_playing(soFire)){audio_play_sound(soFire,80,false)}}
  44.         if(d){circle2X += amount; ini_write_real("Options","Sound Volume",60); audio_group_set_gain(agrSFX,(circle2X/120),1);if(!audio_is_playing(soFire)){audio_play_sound(soFire,80,false)}}
  45.     }
  46.    
  47.     if(selected != 0 || sliderInput = false){
  48.         col1 = c_gray;
  49.     }
  50.     if(selected != 1 || sliderInput = false){
  51.         col2 = c_gray; 
  52.     }
  53.     ini_close();
  54.  
  55.  
  56.     //BAR VARIABLE DRAWING     
  57.     //music bar drawing
  58.     draw_line_width_colour(lineXmin,315,lineXmax,315,5,col1,col1);
  59.     draw_circle_color(lineXmin+circle1X,315,10,col1,col1,false);
  60.        
  61.     circle1X = clamp(circle1X,0,120);
  62.        
  63.        
  64.     //sound bar drawing
  65.     draw_line_width_colour(lineXmin,383,lineXmax,383,5,col2,col2);
  66.     draw_circle_color(lineXmin+circle2X,383,10,col2,col2,false);
  67.        
  68.     circle2X = clamp(circle2X,0,120);
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement