Guest User

pause scr

a guest
Jan 27th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. paused = !paused;
  2. if (paused) {
  3.  var pausescreen1;
  4.  pausescreen1 = surface_create(view_wview,view_hview); //create temporary surface with the size of the view
  5.  surface_set_target(pausescreen1); //set the target to the surface, this will allow us to draw on it
  6.  draw_clear_alpha(c_black,0); //clear the surface
  7.  draw_surface(application_surface,0,0) //draw app_surface to surface target
  8.  surface_reset_target(); //reset the surface target
  9.  surface_save(pausescreen1,working_directory + "\temp.png"); //save the surface
  10.  surface_free(pausescreen1); //free temporary surface to free memory
  11.  background_replace(bac_pause, working_directory + "\temp.png", false, false);
  12.  alarm[0] = 2;
  13. } else {
  14.  //tile_layer_show(1000000);
  15.  tile_layer_show(101);
  16.  tile_layer_show(100);
  17.  tile_layer_show(99);
  18.  instance_activate_all();
  19.  file_delete(working_directory + "\temp.png");
  20.  background_visible[0] = true;
  21. if (!surface_exists(light))
  22. {
  23. light = surface_create(view_wview, view_hview);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment