Skip to content

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:

  1. Add Choice × as many times as needed
  2. Show Selection Window (this event content) ← The selection window first appears on screen here

Property List ​

Item (tscn label)Input formatDescription
WindowSelectSelection window design ID (defined in the UI Tab)
Position XNumber (px) + Screen Center buttonDisplay X coordinate of the selection window (origin at top-left)
Position YNumber (px)Display Y coordinate of the selection window
Button Size XNumber (px)Width of each choice button
Button Size YNumber (px)Height of each choice button
Cursor PosInteger (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.

ValueBehavior
0 (default)Focus is placed on the first choice
1Focus is placed on the second choice
NFocus 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 ​

  1. Create the selection window from the window design defined in the UI Tab
  2. 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)
  3. Place at the specified position (X, Y)

4. Place the choice buttons ​

  1. Generate Button + Label for each choice and arrange them vertically within the window
  2. Apply tr() (runtime translation) to the choice text → Multi-language support is applied automatically
  3. Auto-configure keyboard / gamepad focus movement (up/down, left/right, next/previous)
  4. Mouse hover moves focus to the hovered button
  5. 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 settingsBehavior
Both Event / Label emptyPlay decide sound → Continue in the current event (advance to the next event content)
Event or Label specifiedPlay 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 ​

  1. Show Window (number 0)
  2. Show Text (number 0) ← "Will you really fight?"
  3. Add Choice (text Yes, event battle_scene)
  4. Add Choice (text No, event empty)
  5. Show Selection Window (this event content) (choices appear on screen here)
  6. (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:

  1. Add Choice (text Attack, event empty)
  2. Add Choice (text Defend, event empty)
  3. Show Selection Window (this event content)
  4. Conditional Branch (selection result 0 = Attack) ← Attack processing
  5. Else ← Defend processing
  6. 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:

  1. First selection scene (Add Choice × 2 → this event content)
  2. ... processing ...
  3. Reset Choices
  4. 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:

  1. Add Choice (text Unequip, event empty) ← Dangerous action
  2. Add Choice (text Cancel, event empty) ← Safe action
  3. Show Selection Window (this event content) (Cursor Pos = 1) ← Cancel is the default

Typical Flows ​

Flow 1: Basic dialogue with choices ​

  1. Show Window (number 0, bottom of screen)
  2. Show Text (number 0, Wait Input ON) ← "Where will you go?"
  3. Add Choice (text Eastern forest, event east_forest)
  4. Add Choice (text Western town, event west_town)
  5. 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

Flow 2: Shop menu choices ​

  1. Add Choice (text Buy, event shop_buy)
  2. Add Choice (text Sell, event shop_sell)
  3. Add Choice (text Leave, event empty)
  4. 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:

  1. (In a conditional branch, check acquired items and call Add Choice conditionally)
  2. 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" ​

  1. Add Choice (text Yes, event confirm_action)
  2. Add Choice (text No, event empty)
  3. 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 ​

  1. Add Choice × 2 (choices for question 1)
  2. Show Selection Window (this event content)
  3. ... branch processing ...
  4. Reset Choices ← Clear choices
  5. Add Choice × 3 (choices for question 2)
  6. Show Selection Window (this event content) (with different settings)
Related event contentUse
Add ChoiceAdd choices before this event content (required pair)
Reset ChoicesClear added choices
Show WindowDisplay a message window (for question text)
Show TextDisplay the question before choices
Move To EventTransition destination based on selection result
Set LabelDefine labels for transition destinations
Conditional BranchBranch processing based on selection result
PageRelated content
UI TabWindow design (window_data) definition source
Event TabReference target for choice Event property
Event Content ListList 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.