Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///objPause step event code
- if (global.previous_room == rmSequence1 or global.previous_room == rmSequence1Downstairs) {
- global.cantrestart = true;
- } else {
- global.cantrestart = false;
- }
- if wait>0 wait-=1
- if global.xbox=1 {
- if checkbutton(0,getid(5)) {
- if presstart=0 {
- presstart=1
- scrXboxPauseStart()
- }
- } else presstart=0
- if checkbutton(0,getid(6)) {
- if pressback=0 {
- pressback=1
- scrXboxPauseBack()
- }
- } else pressback=0
- if leftthumb_y(0)>5000 {
- if pressup=0 {
- pressup=1
- scrXboxPauseUp()
- }
- } else pressup=0
- if leftthumb_y(0)<-5000 {
- if pressdown=0 {
- pressdown=1
- scrXboxPauseDown()
- }
- } else pressdown=0
- }
- if keyboard_check_pressed(ord(global.upkey)) event_perform(ev_keypress,ord('W'))
- if keyboard_check_pressed(ord(global.downkey)) event_perform(ev_keypress,ord('S'))
- SteamRunCallbacks()
- if !surface_exists(global.surf1) {
- global.surf1=surface_create(room_width,room_height)
- surface_set_target(global.surf1)
- draw_clear_alpha(c_black,0)
- surface_reset_target()
- }
- surface_set_target(global.surf1)
- draw_clear_alpha(c_black,0)
- text="PAUSE"
- if on=1 {if textdir2<180 textdir2+=10} else {textdir2=blacky*180}
- if on=1 factor=0.5-lengthdir_x(0.5,textdir2) else {if factor>0 factor-=0.05 else {if on=2 {if !instance_exists(objPuzzle) instance_create(x,y,objPuzzle)}}}
- i=0
- draw_set_font(fntUnlock)
- draw_set_halign(fa_left)
- draw_set_valign(fa_center)
- start_x=view_wview[0]/2-string_width(text)*0.5
- repeat (string_length(text))*factor {
- letter=string_copy(text,1+i,1)
- ii=0
- repeat (5+lengthdir_x(4,textdir1+i*60)) {
- draw_set_color(merge_color(c_teal,c_white,ii*0.1))
- draw_text_transformed(start_x,room_height*0.35-ii*0.5,letter,1+ii*0.01,1+ii*0.01,0)
- ii+=1
- }
- start_x+=string_width(letter)
- i+=1
- }
- draw_set_font(fntMenu)
- i=0
- ii=0
- repeat (3) {
- if select == i {
- repeats = 6 + lengthdir_x(5, dir * 2);
- if on == 1 {
- if frac(i * 0.5) > 0 addx = 260 * (1 - factor);
- else addx = -260 * (1 - factor);
- } else {
- if frac(i * 0.5) > 0 addx = -260 * (1 - factor);
- else addx = 260 * (1 - factor);
- }
- repeat (repeats) {
- // Check if the current option is the "restart" option (i == 1) and global.cantrestart is true
- if global.cantrestart == true and i == 1 {
- // Draw gray coloring over "Restart"
- draw_set_color(c_dkgray);
- } else {
- // Apply the fuchsia and white merged color for all other cases
- draw_set_color(merge_color(c_fuchsia, c_white, ii * 0.085));
- }
- draw_text(room_width / 2 - 56 + ii + addx, room_height / 2 + i * 20, choice[i]);
- ii += 1;
- }
- } else {
- if on = 1 {
- if frac(i * 0.5) > 0 addx = 260 * (1 - factor) else addx = -260 * (1 - factor)
- } else {
- if frac(i * 0.5) > 0 addx = -260 * (1 - factor) else addx = 260 * (1 - factor)
- }
- amount = 0.5 + lengthdir_x(0.5, dir * 2);
- // Check if this is the "restart" option and grey it out if cantrestart is true
- if global.cantrestart == true and i == 1 {
- draw_set_color(c_dkgray); // Set grey color for the greyed-out option
- } else {
- draw_set_color(merge_color(c_white, c_aqua, amount));
- }
- draw_text(room_width / 2 - 56 + 1 + addx, room_height / 2 + i * 20 + 1, choice[i]);
- amount = 0.5 - lengthdir_x(0.5, dir * 2);
- // Reset color to normal if not greyed out
- if global.cantrestart == true and i == 1 {
- draw_set_color(c_dkgray); // Set grey color again for the main text
- } else {
- draw_set_color(merge_color(c_white, c_aqua, amount));
- }
- draw_text(room_width / 2 - 56 + addx, room_height / 2 + i * 20, choice[i]);
- }
- i += 1;
- }
- textdir1-=4
- surface_alpha()
- surface_reset_target()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement