Show Selection Window
Category: Message
An event content that displays the choices added via Add Choice as a selection window on screen. When the player picks one of the choices, depending on the settings, the flow either transitions to another event or continues within the current event.
Must be used in pairs with Add Choice
This event content requires one or more choices added in advance via Add Choice. Running this event content with 0 choices does nothing and advances to the next event content.
Basic flow:
- Add Choice × as many times as needed
- Show Selection Window (this event content) ← The selection window first appears on screen here
Property List
| Item (tscn label) | Input format | Description |
|---|---|---|
| Window | Select | Selection window design ID (defined in the UI Tab) |
| Position X | Number (px) + Screen Center button | Display X coordinate of the selection window (origin at top-left) |
| Position Y | Number (px) | Display Y coordinate of the selection window |
| Button Size X | Number (px) | Width of each choice button |
| Button Size Y | Number (px) | Height of each choice button |
| Cursor Pos | Integer (0 or more) | Index of the choice initially selected when the window appears (0 = first) |
| Preview button | — | Instantly preview the selection window with current settings |
Property Details
Window
Select the selection window design ID. Choices are auto-extracted from window designs defined in the UI Tab.
Preset auto-reflection (added 2026-09-17)
Selecting a window auto-reflects the position (position_x / position_y) of that window defined in the UI Tab. However, button size is not part of the preset (it is a setting specific to this event content, not the window design) and is not changed.
Position X / Y
Specify the display position of the selection window in pixel units.
- X: Horizontal offset from the left edge of the screen
- Y: Vertical offset from the top edge of the screen
- Coordinate system: Origin at top-left (0, 0), X increases to the right, Y increases downward
Screen-center button is X only
To the right of Position X there is a Screen Center button, which when pressed auto-calculates and inputs the X value for center placement with:
Screen center X = (viewport width - window width) / 2- Window width =
Button Size X + 24(24 is the system-fixed padding)
Reason there is no screen-center button for Y: The height of the selection window depends on the number of choices (Button Size Y × choice count + padding), so vertical center placement cannot be auto-calculated from this event content's settings alone. For vertical centering, calculate manually.
Button Size X / Y
Specify the size of each choice button in pixel units.
- X: Width of each choice button
- Y: Height of each choice button
Window width expands automatically
If there is a choice whose text is longer than Button Size X, the window expands automatically (extended to fit the longest text). Button Size X behaves like a "minimum width."
Window height is calculated as Button Size Y × choice count + 24.
Cursor Pos
Specify the initial cursor position when the selection window is displayed as a 0-based index.
| Value | Behavior |
|---|---|
| 0 (default) | Focus is placed on the first choice |
| 1 | Focus is placed on the second choice |
| N | Focus is placed on the (N+1)th choice |
Fallback for out-of-range values
If Cursor Pos is greater than or equal to the number of choices or a negative value, it automatically falls back to 0 (the first). This is not an error.
Use cases:
- In a 2-option "Yes / No" with default set to "No" (Cursor Pos = 1) → Prevents accidental selection by mispress
- For multiple choices, prefer presenting a past selection
Does not work in versions before 2026-10-03
This property was fixed to work correctly in a bug fix on 2026-10-03. In earlier versions, Cursor Pos is ignored and focus is always placed on the first (this fix is scheduled to be included in the v1.0.0 release).
Preview button
Instantly preview the selection window inside the editor with the current settings. The preview is a tentative display (two button frames) that does not match the actual number of choices, but it is useful for checking the window design and position.
Runtime Behavior
When this event content runs, processing proceeds as follows:
1. Choice presence check
If the pre-added choices (choice_data) are 0, no window is generated and the flow immediately advances to the next event content (no error).
2. Dispose of existing window
If a selection window is already open, dispose of it first and then create a new one.
3. Window generation
- Create the selection window from the window design defined in the UI Tab
- Auto-calculate the window size:
- Width = max(Button Size X, longest-text width across all choices) + padding (24 px)
- Height = Button Size Y × choice count + padding (24 px)
- Place at the specified position (X, Y)
4. Place the choice buttons
- Generate Button + Label for each choice and arrange them vertically within the window
- Apply
tr()(runtime translation) to the choice text → Multi-language support is applied automatically - Auto-configure keyboard / gamepad focus movement (up/down, left/right, next/previous)
- Mouse hover moves focus to the hovered button
- Place initial focus on the choice specified by Cursor Pos (cursor_index)
5. Wait for player selection
When the player presses the decide key or clicks a choice, the selection is confirmed.
6. Behavior after selection (_on_click)
Branches based on the selected choice's Event and Label specifications:
| Choice settings | Behavior |
|---|---|
| Both Event / Label empty | Play decide sound → Continue in the current event (advance to the next event content) |
| Event or Label specified | Play decide sound → Transition to the specified event + label |
In either case, after selection the internal choice list is cleared. To use choices again next time, you need to add them again via Add Choice.
Typical Combinations
This event content is always used paired with Add Choice. For the complete picture, see Combination Patterns.
Basic 2-option pattern
- Show Window (number 0)
- Show Text (number 0) ← "Will you really fight?"
- Add Choice (text
Yes, eventbattle_scene) - Add Choice (text
No, event empty) - Show Selection Window (this event content) (choices appear on screen here)
- (Comes here when No is selected) Show Text ← "You fled."
Branch by selection result (Event empty pattern)
Leave Event empty and branch within the same event:
- Add Choice (text
Attack, event empty) - Add Choice (text
Defend, event empty) - Show Selection Window (this event content)
- Conditional Branch (selection result 0 = Attack) ← Attack processing
- Else ← Defend processing
- End If
Switch between selections via reset
When you have multiple selection scenes in the same event, insert Reset Choices so previous choices do not remain, and redo Add Choice:
- First selection scene (Add Choice × 2 → this event content)
- ... processing ...
- Reset Choices
- Second selection scene (Add Choice × 3 → this event content)
Set the default choice to the 2nd (using Cursor Pos)
To prevent mispress or consider past selections:
- Add Choice (text
Unequip, event empty) ← Dangerous action - Add Choice (text
Cancel, event empty) ← Safe action - Show Selection Window (this event content) (Cursor Pos =
1) ← Cancel is the default
Typical Flows
Flow 1: Basic dialogue with choices
- Show Window (number 0, bottom of screen)
- Show Text (number 0, Wait Input ON) ← "Where will you go?"
- Add Choice (text
Eastern forest, eventeast_forest) - Add Choice (text
Western town, eventwest_town) - Show Selection Window (this event content)
- Window:
default_choice_window - Position X: Use the Screen Center button
- Position Y: 400 (bottom of screen)
- Button Size X: 200, Y: 40
- Cursor Pos: 0
- Window:
Flow 2: Shop menu choices
- Add Choice (text
Buy, eventshop_buy) - Add Choice (text
Sell, eventshop_sell) - Add Choice (text
Leave, event empty) - Show Selection Window (this event content) (Cursor Pos = 0)
Flow 3: Dynamic choice count based on variables
The number of choices may vary from pre-processing, but this event content is the same:
- (In a conditional branch, check acquired items and call Add Choice conditionally)
- Show Selection Window (this event content)
The window size is auto-adjusted according to the number of choices.
Flow 4: Safe design with default "No"
- Add Choice (text
Yes, eventconfirm_action) - Add Choice (text
No, event empty) - Show Selection Window (this event content) (Cursor Pos =
1) ← Default set to No
Recommended for confirmation of destructive actions (item deletion, character deletion, etc.).
Flow 5: Reset choices between multiple selection scenes
- Add Choice × 2 (choices for question 1)
- Show Selection Window (this event content)
- ... branch processing ...
- Reset Choices ← Clear choices
- Add Choice × 3 (choices for question 2)
- Show Selection Window (this event content) (with different settings)
Related Event Contents
| Related event content | Use |
|---|---|
| Add Choice | Add choices before this event content (required pair) |
| Reset Choices | Clear added choices |
| Show Window | Display a message window (for question text) |
| Show Text | Display the question before choices |
| Move To Event | Transition destination based on selection result |
| Set Label | Define labels for transition destinations |
| Conditional Branch | Branch processing based on selection result |
Related Pages
| Page | Related content |
|---|---|
| UI Tab | Window design (window_data) definition source |
| Event Tab | Reference target for choice Event property |
| Event Content List | List of all event contents |
Notes
Nothing is displayed with 0 choices
Without adding at least one choice via Add Choice in advance, this event content does nothing and advances to the next event content (no error).
Window width expands automatically
If there is a choice whose text is longer than Button Size X, the window width expands automatically. If a larger window than expected appears, check for choices with long text.
Window height depends on choice count
Window height is auto-calculated as Button Size Y × choice count + 24. Having so many choices that they do not fit on screen is not recommended.
Screen-center button is X only
There is no screen-center button for Y. For vertical centering, calculate manually.
Internal choice list is cleared after selection
After selection, the internal choice_data is cleared, so if you want to reuse the same choices, you need to run Add Choice again.
"Decide sound" is set in the System tab
The decide sound played on selection uses the "Decide" setting in the "Sound" section of the System Tab.
Date of Cursor Pos fix (2026-10-03)
The Cursor Pos property was fixed to work correctly in a bug fix on 2026-10-03. In earlier versions, focus is always placed on the first.
