Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:all-features:screenshot [2018/12/30 16:44]
wendigo [Actions]
gdevelop5:all-features:screenshot [2018/12/30 21:44] (current)
4ian
Line 1: Line 1:
 ====== Screenshot extension ====== ====== Screenshot extension ======
-This extension lets you save a screen shot of the running game in a specified folder.+This extension lets you save a screenshot ​of the running game in a specified folder.
  
 ==== Actions ==== ==== Actions ====
 === Take screenshot === === Take screenshot ===
-Use this action to save a screen shot of everything which is currently drawn on the game window into a //png// file.+Use this action to save a screenshot ​of everything which is currently drawn on the game window into a //png// file.
 == Parameters: == == Parameters: ==
-** Save path**: The file path where the screen shot should be saved.+** Save path**: The file path where the screenshot ​should be saved.
  
-The save path needs to be an absolute path on the file system ​like:+The save path needs to be an absolute path on the file system ​(Like "C:\MyFolder\MyScreenshot.png"​ on Windows)'​
  
-- C:​\MyFolder\MyScreenshot.png **(Windows )**+Relative paths are not supported.
  
-/home/username/MyFolder/MyScreenshot.png **(Linux)**+<​note>​In order to create a game that runs on all supported platforms you should use the special folders from the file system extension in combination with the path separator. These determine the path to common folders like //Pictures//, //​Documents//​ or //Desktop// automaticallyYou can read more about it in [[gdevelop5:​all-features:​filesystem|this article]]. 
 +</​note>​ 
 +===== Example =====
  
-- /​Users/​username/​Myfolder/​MyScreenshot.png **(MacOS)** 
  
-Relative paths are not supported.+This path: 
 + 
 +``` 
 +FileSystem::​PicturesPath() + FileSystem::​PathDelimiter() + "​my_screenshot.png"​ 
 +``` 
 + 
 +This will save the screenshot to the //​Pictures//​ folder on Windows, Linux and MacOS
  
-<​note>​In order to create a game that runs on all supported platforms you should use the special folders from the file system extension in combination with the path separator. These determine the path to common folders like //​Pictures//,​ //​Documents//​ or //Desktop// automatically. You can read more about it in [[gdevelop5:​all-features:​filesystem|this article]].</​note>​+