Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(currentArray = optionsArray){
- if(global.useGamepad = false){
- var w = keyboard_check_pressed(global.up);
- var s = keyboard_check_pressed(global.down);
- var a = keyboard_check_pressed(global.left);
- var d = keyboard_check_pressed(global.right);
- var enter = keyboard_check_pressed(global.enter);
- }
- else if(global.useGamepad = true){
- var w = (gamepad_axis_value(0,global.moveUp) < 0);
- var s = (gamepad_axis_value(0,global.moveUp) > 0);
- var a = (gamepad_axis_value(0,global.moveRight) < 0);
- var d = (gamepad_axis_value(0,global.moveRight) > 0);
- var enter = (gamepad_button_check_pressed(0,global.contEnter));
- }
- var lineXmin,lineXmax,amount;
- lineXmin= 640-60;
- lineXmax= 640+60;
- amount = 1;
- //BAR VARIABLE CHANGES
- //music bar change
- ini_open("save.sav");
- if(enter && (selected = 0 || selected = 1)){
- sliderInput = !sliderInput;
- if(sliderInput = true){if(!audio_is_playing(soMenuBlip)){audio_play_sound(soMenuBlip,80,false);}}
- else if(sliderInput = false){if(!audio_is_playing(soMenuBackupBlip)){audio_play_sound(soMenuBackupBlip,80,false);}}
- }
- if(selected = 0 && sliderInput = true){
- col1 = c_white;
- if(a){circle1X -= amount; ini_write_real("Options","Music Volume",60); audio_group_set_gain(agrMusic,(circle1X/120),1);}
- if(d){circle1X += amount; ini_write_real("Options","Music Volume",60); audio_group_set_gain(agrMusic,(circle1X/120),1);}
- }
- //sound bar change
- else if(selected = 1 && sliderInput = true){
- col2 = c_white;
- 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)}}
- 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)}}
- }
- if(selected != 0 || sliderInput = false){
- col1 = c_gray;
- }
- if(selected != 1 || sliderInput = false){
- col2 = c_gray;
- }
- ini_close();
- //BAR VARIABLE DRAWING
- //music bar drawing
- draw_line_width_colour(lineXmin,315,lineXmax,315,5,col1,col1);
- draw_circle_color(lineXmin+circle1X,315,10,col1,col1,false);
- circle1X = clamp(circle1X,0,120);
- //sound bar drawing
- draw_line_width_colour(lineXmin,383,lineXmax,383,5,col2,col2);
- draw_circle_color(lineXmin+circle2X,383,10,col2,col2,false);
- circle2X = clamp(circle2X,0,120);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement