Skip to content

Commit 82111da

Browse files
[Auto] [Improve] Enhanced UI and visual objects documentation with detailed properties and usage guidance (#444)
1 parent 8f8032d commit 82111da

7 files changed

Lines changed: 96 additions & 24 deletions

File tree

automated_updates_data.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{ "date": "2026-02-16", "summary": "Enhanced 3D model documentation with animation controls, material types, origin/center points, and shadow configuration" },
55
{ "date": "2026-02-16", "summary": "Improved core behavior documentation: added Window Center anchor option, draggable collision mask and Z-order details, destroy outside parameters" },
66
{ "date": "2026-02-16", "summary": "Enhanced pathfinding documentation with grid offset properties, path smoothing, obstacle cost clarification, and activation behavior" },
7+
{ "date": "2026-02-16", "summary": "Improved UI and visual object documentation: enhanced light, button, slider, text, panel sprite, and particle emitter pages with detailed properties and usage tips" }
78
{ "date": "2026-02-16", "summary": "Enhanced tween behavior documentation with scale center options, color modes, exponential interpolation, and effect properties" }
89
]
910
}

docs/gdevelop5/objects/button/index.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,20 @@ Button clicks/taps can be checked with a condition in events:
3636

3737
![](button-clicked-condition.png)
3838

39-
Other conditions can be used to check the button state. For instance, it allows to apply [an effect](/gdevelop5/objects/effects) to make a button appear brighter when it's pressed.
39+
Other conditions can be used to check the button state. For instance, it allows to apply [an effect](/gdevelop5/objects/effects) to make a button appear brighter when it's pressed.
40+
41+
### Button states
42+
43+
Buttons have three distinct states that determine which image is displayed:
44+
45+
- **Idle**: The default state when the button is not being interacted with
46+
- **Hovered**: When the mouse cursor is over the button (on desktop/web) or when a touch is held on the button (on mobile)
47+
- **Pressed**: When the button is actively being clicked or tapped
48+
49+
You can check these states in events to create visual feedback or trigger different behaviors.
50+
51+
### Tips for button design
52+
53+
- Use consistent button sizes across your UI for a professional look
54+
- Make sure button images have enough contrast so text on them is readable
55+
- Add sound effects when buttons are clicked to improve user experience

docs/gdevelop5/objects/light/index.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,36 @@ title: Light
33
---
44
# Light
55

6-
Light objects simulate light sources in 2D and cast shadows on other objects.
6+
Light objects simulate light sources in 2D and cast shadows on other objects. They create atmospheric and realistic lighting effects by simulating how light spreads and is blocked by obstacles.
7+
78
Light objects can be customized with several properties:
89

9-
- a light color
10-
- a light radius
11-
- a texture to give a shape to the light
10+
- **Light color**: Set the color of the light using RGB values (for example, warm orange for fire, cool blue for moonlight)
11+
- **Light radius**: Control how far the light spreads from its source (in pixels)
12+
- **Light texture**: An optional image to give a specific shape to the light (such as a cone for flashlights or spotlights)
13+
- **Debug mode**: An advanced option that displays the lines used to render the light, useful for understanding the rendering
1214

1315
## How does it work?
1416

15-
By default, light rays are cast from light objects and are blocked by other objects edges using the Light Obstacle behavior.
17+
By default, light rays are cast from light objects and are blocked by other object edges using the **Light Obstacle behavior**.
1618

17-
Light rays will take into account the custom collisions masks on the objects with the Light Obstacle behavior.
19+
To make an object block light:
1820

19-
### Using the light texture
21+
1. Select the object that should cast a shadow
22+
2. Add the "Light Obstacle Behavior" to it
23+
3. The light will now be stopped by this object's edges
24+
25+
Light rays will take into account the custom collision masks on objects with the Light Obstacle behavior. This means you can control exactly which parts of an object block the light by editing its collision mask.
2026

21-
The light texture property allows to create a custom shape for the light.
27+
!!! note
28+
29+
Light objects only work in 2D games. They do not affect 3D objects. For 3D lighting, use the built-in 3D lighting features.
30+
31+
### Using the light texture
2232

33+
The light texture property allows you to create a custom shape for the light. Without a texture, light is rendered as a circular gradient that fades from bright at the center to dark at the edges.
2334

24-
For instance, a flashlight effect can be achieved by using a cone-shaped texture.
35+
By providing a texture image, you can control the shape and pattern of the light. For instance, a flashlight effect can be achieved by using a cone-shaped texture.
2536

2637
| ![The light texture used in the object.](Cone_Light.png) | ![The result of a light texture in game](result_light_texture.png) |
2738
|---|---|

docs/gdevelop5/objects/panel_sprite/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Panel Sprite ("9 patch")
33
---
44
# Panel Sprite ("9 patch")
55

6-
Panel sprite is an [object](/gdevelop5/objects) where its image is split into 9 pieces or slices and each slice is scaled separately. This can be helpful where you would need the object to keep it's proportions even after it is scaled. It can be useful for making the frames of a menu interface, as tiles (land, water, etc..) in top down games, as platforms in platformer games, used in health bars, etc.
6+
Panel sprite is an [object](/gdevelop5/objects) where its image is split into 9 pieces or slices and each slice is scaled separately. This can be helpful where you would need the object to keep its proportions even after it is scaled. It can be useful for making the frames of a menu interface, as tiles (land, water, etc.) in top down games, as platforms in platformer games, used in health bars, dialog boxes, and more.
77

88
!!! note
99

@@ -43,6 +43,21 @@ If "repeat borders and center texture" is enabled, segments 2, 4, 5, 6, 8 will b
4343

4444
![](9panel6.png)
4545

46+
### When to use Panel Sprite vs other objects
47+
48+
Panel Sprite is ideal when you need:
49+
50+
- **UI elements** that can resize without distortion (buttons, panels, frames)
51+
- **Borders and decorative frames** that must maintain corner detail
52+
- **Dialog boxes** that adjust to fit varying amounts of text
53+
- **Scalable platforms** in platformer games that keep edge details intact
54+
55+
For other use cases:
56+
57+
- Use regular [Sprite](/gdevelop5/objects/sprite) objects when you don't need to resize, or stretching is acceptable
58+
- Use [Tiled Sprite](/gdevelop5/objects/tiled_sprite) objects when you need a pattern that repeats uniformly in all directions
59+
- Panel Sprites work well as components in [custom objects](/gdevelop5/objects/custom-objects-prefab-template) for reusable UI elements
60+
4661
## Reference
4762

4863
All actions, conditions and expressions are listed in [the panel sprite (9-patch) object reference page](/gdevelop5/all-features/panel-sprite-object/reference/).

docs/gdevelop5/objects/particles_emitter/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ You can also change the maximum number of particles rendered by the object on th
5959
## Reference
6060

6161
All actions, conditions and expressions for the 2D particle emitter are listed in [this reference page](/gdevelop5/all-features/particle-system/reference/).
62-
All actions, conditions and expressions for the 23 particle emitter are listed in [this reference page](/gdevelop5/extensions/particle-emitter3d).
62+
All actions, conditions and expressions for the 3D particle emitter are listed in [this reference page](/gdevelop5/extensions/particle-emitter3d).

docs/gdevelop5/objects/slider/index.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,29 @@ When a slider is added into the scene, it takes the default size set for the sli
4141

4242
A slider would be useless if the game can't react when its value is changed.
4343

44-
Slider values can be read with the `Value()` expression. It's can be used to store this as a variable or use it to change a property of an object.
44+
Slider values can be read with the `Value()` expression. It can be used to store this as a variable or use it to change a property of an object.
4545

4646
![](slider-value-expression.png)
4747

48-
Sliders and toggle switches can be useful to make a settings panel. As the settings panel and the game may be in different scene, the value can be stored in a global variable to use it in other game scenes.
48+
### Using slider values in your game
49+
50+
Here are some common ways to use slider values:
51+
52+
- **Volume control**: Use the slider value to set the volume of music or sound effects (typically 0-100)
53+
- **Difficulty settings**: Allow players to adjust game difficulty with a slider
54+
- **Graphics settings**: Control visual quality, brightness, or other rendering options
55+
- **Gameplay parameters**: Adjust speed, power, or other in-game values
56+
57+
### Saving slider settings
58+
59+
Sliders and toggle switches are useful for creating settings panels. Since the settings panel and the game may be in different scenes, store the value in a global variable to use it across all game scenes.
60+
61+
You can also use the [Storage feature](/gdevelop5/all-features/storage) to save slider values between game sessions, so player preferences persist even after closing the game.
62+
63+
### Slider range and step
64+
65+
When creating a slider, you can configure:
66+
67+
- **Minimum value**: The lowest value the slider can represent
68+
- **Maximum value**: The highest value the slider can represent
69+
- **Step size**: How much the value changes as the thumb moves (for example, a step of 1 means whole numbers only)

docs/gdevelop5/objects/text/index.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The color of the text can be changed by clicking on the palette color square, lo
2525

2626
### Font and text style
2727

28-
You can choose from bold and italic, as well as choosing a custom font for the text. A custom font will require a font file, for which the file format must be TTF or OFT.
28+
You can choose from bold and italic, as well as choosing a custom font for the text. A custom font will require a font file, for which the file format must be TTF or OTF.
2929
![](change-style-of-text.png)
3030

3131
### Additional effects
@@ -52,14 +52,22 @@ You can choose from bold and italic, as well as choosing a custom font for the t
5252

5353
Using events, you can modify all properties of the text object, such as:
5454

55-
* Text Displayed
56-
* Bold
57-
* Italic
58-
* Padding
59-
* Alignment
60-
* Wrapping
61-
* Wrapping Width
62-
* Font Size
55+
* **Text Displayed**: Change the actual text content
56+
* **Bold**: Make text bold or remove bold styling
57+
* **Italic**: Make text italic or remove italic styling
58+
* **Padding**: Add space around the text (useful when using backgrounds or borders)
59+
* **Alignment**: Align text to left, center, or right
60+
* **Wrapping**: Enable or disable automatic line wrapping
61+
* **Wrapping Width**: Set the maximum width before text wraps to a new line
62+
* **Font Size**: Change the size of the text dynamically
63+
64+
### Text object performance
65+
66+
Text objects are efficient for displaying text, but keep these performance tips in mind:
67+
68+
- Avoid changing text content every frame if the text doesn't actually change
69+
- When displaying many numbers that update frequently (like scores), consider using [Bitmap Text](/gdevelop5/objects/bitmap_text) objects for better performance
70+
- For styled text with multiple colors or fonts in one block, consider using [BBText](/gdevelop5/objects/bbtext) objects
6371

6472
## Examples
6573

@@ -82,4 +90,4 @@ Typewriter effect from extension
8290

8391
## Reference
8492

85-
All actions, conditions and expressions are listed in [the text object reference page](/gdevelop5/all-features/text-object/reference/).
93+
All actions, conditions and expressions are listed in [the text object reference page](/gdevelop5/all-features/text-object/reference/).

0 commit comments

Comments
 (0)