diff --git a/automated_updates_data.json b/automated_updates_data.json index 963bfb8c415..3274fc9a482 100644 --- a/automated_updates_data.json +++ b/automated_updates_data.json @@ -92,6 +92,10 @@ { "date": "2026-04-22", "summary": "Improved resources-loading docs (named Preload scene action, documented SceneLoadingProgress expression and AreSceneAssetsLoaded condition, clarified custom loading screen approach) and added extension lifecycle functions table to events/functions docs" + }, + { + "date": "2026-05-15", + "summary": "Improved keyboard docs (clarified Key pressed vs Key just pressed, noted on-screen keyboard limitation), window docs (game resolution vs window size, resize modes, center window, icon, advanced window management) and screenshot docs (desktop-only support and auto-appended .png)" } ] } diff --git a/docs/gdevelop5/all-features/keyboard/index.md b/docs/gdevelop5/all-features/keyboard/index.md index a939ed6bcbe..597bced8b6c 100644 --- a/docs/gdevelop5/all-features/keyboard/index.md +++ b/docs/gdevelop5/all-features/keyboard/index.md @@ -5,22 +5,34 @@ title: Keyboard GDevelop gives access to all inputs made on the keyboard. This includes conditions to check if a key was pressed or released. +!!! note + + The keyboard conditions only react to physical keys. They do **not** trigger from the on-screen keyboard on mobile or touch devices. For mobile games, use the touch or [Text Input](/gdevelop5/objects/text_input/) conditions instead. + ## Any key pressed For this condition, the corresponding action/s will be performed if any key on the keyboard is pressed. ## Key pressed -Whenever the key selected while setting this condition is pressed, the corresponding actions are performed. +This condition stays **true for as long as the key is held down**. Use it for continuous actions, like moving a character while a direction key is held. + +If you only need to react once, the moment the key starts being pressed (for example, to fire a bullet or pause the game), use the **Key just pressed** condition instead. + +## Key just pressed + +This condition is only **true during the single frame the key starts being pressed**. It will not trigger again until the key has been released and pressed again. ## Key released -Whenever the key selected while setting this condition is released, the corresponding actions are performed. +Whenever the key selected while setting this condition is released, the corresponding actions are performed (true only during the frame the key is released). ## Key pressed (text expression) To test a key press using this condition, you need to enter the key name in the form of text expression. For example, if you want to check condition for left arrow key press, you need to enter "Left" in the field. +A "Key just pressed" variant is also available when you need to react only on the frame the key starts being pressed. + !!! danger Make sure that the key name is surrounded by quotes. diff --git a/docs/gdevelop5/all-features/screenshot/index.md b/docs/gdevelop5/all-features/screenshot/index.md index bb4518a4228..c5fc6c3da0f 100644 --- a/docs/gdevelop5/all-features/screenshot/index.md +++ b/docs/gdevelop5/all-features/screenshot/index.md @@ -5,6 +5,10 @@ title: Screenshot extension This extension lets you save a screenshot of the running game in a specified folder. +!!! note + + Taking a screenshot is only supported when the game is running on **Windows, Linux or macOS**. The action has no effect in browsers or on mobile devices (where games run inside a browser container that cannot write to the file system). + Note: As of GDevelop 5.0.0-beta92 the screenshot action is no longer an extension. Just add an action and search for `screenshot` or go to `Other Actions`/`Screenshot`/`Take screenshot`. ### Actions @@ -19,7 +23,7 @@ Use this action to save a screenshot of everything which is currently drawn on t The save path needs to be an absolute path on the file system (Like "C:\MyFolder\MyScreenshot.png" on Windows)' -Relative paths are not supported. +Relative paths are not supported. If the path does not end with `.png`, the `.png` extension is appended automatically. !!! note diff --git a/docs/gdevelop5/all-features/window/index.md b/docs/gdevelop5/all-features/window/index.md index c3ef482243a..d5a533e6529 100644 --- a/docs/gdevelop5/all-features/window/index.md +++ b/docs/gdevelop5/all-features/window/index.md @@ -6,7 +6,9 @@ title: Window and game area The window of the game is the area in which the game is displayed. It DOES NOT refer to the system window that includes the toolbar, title bar on the top and a frame on the other three sides. ## Fullscreen -The "De/activate fullscreen" action allows you to toggle the game between fullscreen on/off. When the window is in fullscreen, it will take up as much area as possible. You can control the action using the "YES" and "NO" actions. +The "De/activate fullscreen" action allows you to toggle the game between fullscreen on/off. When the window is in fullscreen, it will take up as much area as possible. + +The action also takes a second parameter, **Keep aspect ratio** (HTML5 games only). When set to "YES", black borders are added if needed so the game keeps its original aspect ratio; when set to "NO", the game is stretched to fill the whole screen. ## Window margins The margin of the window is the distance between the side of the window and the game window displayed. Shown below is the preview of a game with 100 px margins on all 4 sides. @@ -31,6 +33,27 @@ If you want to scale the set resolution to the window area, choose "YES". This w ![](/gdevelop5/all-features/annotation_2019-06-29_175540.png) +## Game window size vs. game resolution + +These are two different things: + +- The **game resolution** is the number of pixels the game renders internally (the size of the camera view). Change it with the **Game resolution** action. This does not change the size of the window — instead, the rendered image is scaled to fit it. +- The **game window size** is the actual size of the window on the player's screen. Change it with the **Game window size** action. This only works on desktop (Windows, macOS, Linux); browsers and mobile devices ignore it. + +The **Game resolution resize mode** action lets the game automatically adapt its resolution when the window or screen size changes — set it to `adaptWidth` to keep the height fixed and adjust the width, `adaptHeight` to keep the width fixed and adjust the height, or leave it empty to disable. The companion action **Automatically adapt the game resolution** controls whether this re-adaptation also happens at runtime (not only when the game starts). + +## Center the game window + +The **Center the game window on the screen** action repositions the window in the middle of the screen. This only works on Windows, macOS and Linux — it has no effect in a browser or on iOS/Android. + +## Window icon + +Use the **Window's icon** action to change the icon of the game's window at runtime, by providing the name of a resource image. This is useful for games where the icon should reflect game state (for example, a different icon depending on the current player or level). + +## Advanced window management + +For finer control on desktop (focus, visibility, minimize/maximize, always-on-top, content protection, window position), GDevelop also provides an **Advanced window management** extension. Its actions only work on Windows, macOS and Linux and are ignored on other platforms. + ## Window title The window title is the name of the window that is visible on the title bar (located at the top) of the window. The default title name is "Preview of ProjectName" during a preview.