Show Window
Category: Message
An event content that displays a new Window on the game screen. The displayed Window can later receive text messages via the "Show Text" event content, or present choices to the player via "Show Selection Window".
What is a Window
In this tool, the rectangular frame displayed on the game screen is called a "Window". It is the basic unit of UI, used for text display areas, backgrounds of choices, shop menus, and more.
A Window is created based on the design (frame appearance) defined in the UI tab. In this event content, you specify "which design to use / at which position / at what size / with which number to display".
Property List
| Item (tscn label) | Input form | Description |
|---|---|---|
| Window | Selection | The design ID of the Window to display (defined in the UI tab) |
| Number | Integer (0-100) | Window number (for identification) |
| Size X / Y | Number (px) | Width and height of the Window (pixels) |
| Position X / Y | Number (px) | Display position of the Window (origin at top-left) |
| Screen Center button | — | Automatically sets X / Y to center of the screen |
| Preview button | — | Instantly preview the Window with the current settings |
Details of Each Property
Window
Selects the Window design ID. The choices are automatically extracted from the window designs defined in the UI tab.
Preset is applied automatically
When you select a Window, the size (size_x / size_y) and position (position_x / position_y) defined for that Window in the UI tab are auto-filled into the size and position input fields (added 2026-09-17).
The user can first decide standard sizes and positions in the UI tab, then simply select here to apply them instantly. If needed, individual values can be adjusted as well.
Number
A number that identifies the Window. An integer from 0 to 100.
This number is used by subsequent event contents (Show Text, Shake Window, Hide Window, etc.) to specify "which Window to target".
Example:
- Show Window (Number 1) -> Show Text (Number 1) -> Text is shown in Window number 1
- To display multiple Windows simultaneously, use different numbers
Overwrite with the same number
If you execute "Show Window" while a Window with the same number already exists, the existing Window is destroyed and a new one is created. If you want to change the Window's position or size mid-way, you can run Show Window with the same number to replace it.
Size X / Y
Specifies the width and height of the Window in pixels.
- X: Width (size to the right)
- Y: Height (size downward)
Position X / Y
Specifies the display position of the Window in pixels.
- X: Horizontal offset from the left edge of the screen
- Y: Vertical offset from the top edge of the screen
- Coordinate system: Origin at the top-left (0, 0); X increases to the right and Y increases downward
Screen Center button
A Screen Center button is attached to each of Position X / Y. Pressing it automatically calculates and inputs the position for centering, taking the current size into account.
Formula:
Screen center X = (viewport width - size X) / 2Screen center Y = (viewport height - size Y) / 2
Screen Center buttons are independent
X and Y have separate Screen Center buttons. You can freely combine them, e.g. horizontally centered but vertically top-aligned.
Preview button
Lets you instantly preview the Window in the editor with the current settings. Useful for adjusting size and position before saving.
Runtime Behavior
When this event content is executed, the following happens:
- An internal name
window_<num>is generated based on the Number (e.g. num=1 ->window_1) - If a Window node with the same Number already exists, it is destroyed (safe_free) and then a new one is created
- A Window node is created based on the Window design (window_key) defined in the UI tab
- The specified size (
size_x,size_y) and position (position_x,position_y) are applied - The Z-index is set to the Number -> Windows with larger Numbers are displayed in front
- Inside the Window, a TextArea (with padding) and a transparent button (for click detection) are placed automatically
- The next event content runs automatically (no waiting)
The Window is stored under the specified Number, so subsequent event contents can reference it by Number.
Number and front/back order of display
The Z-index of a Window is equal to its Number. When multiple Windows are displayed simultaneously, the Window with the larger Number is displayed in front.
Example:
- Window Number 0 (background, Z=0)
- Window Number 5 (in front, Z=5)
-> Window Number 5 is displayed in front of Window Number 0.
Typical Usage Flows
Flow 1: A basic Window for text display
- In the event content list, select "Add" -> Message category -> Show Window
- Set the following properties:
- Window: Select a basic message design (e.g.
default_window) - Number:
0 - Size: Preset values from the design are auto-filled (adjust if needed)
- Position: Preset values from the design are auto-filled (adjust if needed)
- Window: Select a basic message design (e.g.
- "Add" -> Show Text, specify Number
0 - At runtime, the Window is displayed and the text flows into it
Flow 2: Display multiple Windows simultaneously (character name label + body)
- Show Window (Number 1, small Window at the top of the screen) <- For character name display
- Show Text (Number 1) <- "Hero"
- Show Window (Number 0, large Window at the bottom of the screen) <- For body display
- Show Text (Number 0) <- "Hello, I'm the Hero."
Two Windows are displayed under different Numbers and can be controlled independently.
Flow 3: Place a Window at the center of the screen
- Add a Show Window
- Set the size (e.g. 400 x 100)
- Press the Screen Center button of Position X -> X is auto-calculated
- Press the Screen Center button of Position Y -> Y is auto-calculated
- Confirm center placement with the preview
Flow 4: Replace a Window using the same Number
- Show Window (Number 0, small size) <- Start small
- Show Text -> User reads
- Show Window (Number 0, large size) <- Replace at the same Number with a larger size
- Show Text -> Continuation is shown in the larger Window
Typical Combinations
This event content is used in combination with many other message-category event contents. See Combination Pattern Collection for the overall picture.
The basic usage (Show Window -> Show Text -> Hide Window)
A Window on its own has no meaning; it is a container for putting text into. The basic flow:
- Show Window (this event content) <- Open the Window
- Show Text <- Put text into the Window
- Hide Window <- Close the Window
Reusing a Window
To display multiple texts in sequence in the same Window, just add Show Text repeatedly; the Window is reused. If you want to erase only the text, use Hide Text.
Handling multiple Windows simultaneously
For things like a character name label and a body window, you can display multiple Windows simultaneously under different Numbers. To close them all at once, Hide All Windows is convenient.
Related Event Contents
| Related event content | Use |
|---|---|
| Show Text | Display a text message inside the Window (paired) |
| Hide Text | Erase only the text (the Window remains) |
| Hide Window | Close the Window of the specified Number |
| Hide All Windows | Close all open Windows at once |
| Shake Window | Shake effect on the Window of the specified Number |
| Show Selection Window | Display choices as a selection Window |
Related Pages
| Page | Related content |
|---|---|
| UI Tab | Source of Window design (window_data) definitions |
| Event Content List | List of all event contents |
Notes
Define the Window design in advance in the UI tab
Before using this event content, you need to define the Window design you want to display in the UI tab. Only designs already defined in the UI tab appear in the selection.
Manage Numbers carefully
When handling multiple Windows simultaneously, make sure Numbers do not collide. Since subsequent event contents (such as Show Text) identify the target Window by Number, text may appear in an unintended Window.
Size and position are in pixels
The size and position in this event content are all in pixels. Note that they are different from map cell coordinates.
Switching the design after manual adjustment
If you reselect the Window design, size and position are overwritten with preset values. If you want to keep manually adjusted numbers, re-enter them after changing the Window design.
"Proceed to the next event content" runs immediately
After executing, this event content moves on to the next event content without waiting. If only the Window is displayed and no text has been entered, the next processing runs without the player reading anything.
