SHARE
TWEET

Zrzut ekranu

a guest Dec 6th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if((event.type==sf::Event::KeyReleased)&&(event.key.code==sf::Keyboard::E))
  2.         {
  3.             SFMLHandling::screenshot();
  4.         }
  5.  
  6. void SFMLHandling::screenshot()
  7. {
  8.     sf::Texture t;
  9.     t.create(1400,900);
  10.                t.update(*window);
  11.                sf::Image image=t.copyToImage();
  12.                image.saveToFile("screenshots/screenshot"+std::to_string(iterator_)+".png");
  13.                iterator_++;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top