Show Buttons
Category: Message
Event content that displays buttons added via Add Button all at once on the screen. Only after executing this event content do the added buttons appear on screen and accept user input.
Used as a pair with Add Button
Add Button creates the button immediately but keeps it hidden (visible=false). By executing this event content, all added buttons become visible=true together.
Typical usage:
- Add Button (Number 0, text
Yes) - Add Button (Number 1, text
No) - Show Buttons (this event content) ← Only here do the buttons appear on screen
Property List
This event content has no properties. It operates just by adding it to the event.
Reason for having no properties
This event content simply "visualizes all added button data at once". Since individual display settings (position, size, text, etc.) are all specified on the Add Button side, this event content does not require additional settings.
Runtime Behavior
When this event content is executed, the following processing is performed:
1. Visualization of all buttons
For all buttons in the internally saved button_data:
- Buttons where the node is already generated and the text label is set: Set to visible=true and display on screen
- Buttons without a node or that failed: enable=false (not displayed)
2. Automatic focus movement setting (position-based)
For the displayed button group, the following focus navigation is automatically set:
- Up / Down / Left / Right (focus_neighbor_top / bottom / left / right): Automatically selects the closest button in each direction from the screen position
- Tab equivalent (focus_next / focus_previous): Order of addition (not number order, but order of addition to the button data dictionary)
Focus movement depends on placement
Up / Down / Left / Right focus movement is automatically calculated from placement, so behavior changes depending on how buttons are placed. In diagonal or extremely distant placements, focus movement becomes unintended, so placing buttons aligned to the same row / column is recommended (see the relevant section of Add Button for details).
3. Initial focus
Initial focus is set on the first button in the button data dictionary. Normally the button with the smallest Number (e.g. button_0) is focused first.
4. If there are no buttons, automatically proceed to the next
If this event content is executed in a state where Add Button has never been executed (or all buttons failed to generate), it automatically proceeds to the next event content without waiting. It does not produce an error.
5. Following language switching
After displaying buttons with this event content, if you switch runtime language in game settings, the text of all buttons is automatically redrawn in the new language (text re-application by NOTIFICATION_TRANSLATION_CHANGED). Users do not need to write any additional processing.
Behavior After Click
After displaying buttons, when the user clicks (or presses the decide key) one of the buttons, the following processing is performed:
- The decide sound (system's
sound_decide) is played - Both event / label empty: Continue within the current event (proceed to the next event content)
- event or label specified: Transition to the specified event / label
- In either case, all internal button data is cleared, so to display the same buttons again, you need to arrange them from Add Button again
See Click behavior of Add Button for details.
Typical Usage Flows
Flow 1: Basic 2-choice buttons
- Show Text ← "Do you really want to fight?"
- Add Button (Number 0, text
Yes, position 400, 350, eventbattle_scene) - Add Button (Number 1, text
No, position 680, 350, event empty) - Show Buttons (this event content) ← Only here do buttons appear on screen
- (When "No" is selected, this is reached) Show Text ← "You ran away"
Flow 2: 4-directional menu buttons
- Add Button (Number 0, text
Up, position 600, 150) - Add Button (Number 1, text
Down, position 600, 500) - Add Button (Number 2, text
Left, position 400, 325) - Add Button (Number 3, text
Right, position 800, 325) - Show Buttons (this event content)
Focus naturally moves with the keyboard arrow keys.
Flow 3: Menu buttons inside a window
- Show Window (Number 0, size 600×300, position 340, 210)
- Add Button (Number 1, text
Equipment, position 400, 310) - Add Button (Number 1, text
Items, position 600, 310) - Add Button (Number 1, text
Back, position 800, 310) - Show Buttons (this event content)
Since the button Number (1) is greater than the window number (0), buttons are displayed in front of the window.
Flow 4: Switching button groups after operation
- Add Button × 3 (stage 1 choices)
- Show Buttons (this event content)
- (After click, internal data is auto-cleared)
- Add Button × 3 (stage 2 choices)
- Show Buttons (this event content)
Flow 5: Changing displayed buttons by conditional branch
Combined with branching for buttons with empty Event:
- Add Button (Number 0, text
Attack, event empty) - Add Button (Number 1, text
Defend, event empty) - Show Buttons (this event content)
- Conditional Branch (selection result 0 = Attack selected) ← Attack processing
- (Branch to Defend processing also)
Typical Combinations
This event content is always used paired with Add Button. For the full picture, see Combination Patterns.
Basic free-placement buttons
Question text → Add Button × N → Show Buttons → transition.
- Show Window (Number 0)
- Show Text (Number 0) ← "Which one do you choose?"
- Add Button (Number 0, text
A) - Add Button (Number 1, text
B) - Show Buttons (this event content) ← Buttons appear on screen here
- (Transition on click)
Switching button groups
Switch to a different button set within the same event:
- Add Button × N
- Show Buttons (this event content)
- (After operation, internal data auto-clears on click)
- Reset Buttons ← Use this when switching without clicking
- Add Button × M (new button group)
- Show Buttons (this event content)
Displaying buttons and text simultaneously
Create a question UI by placing text and buttons side by side:
- Show Window (Number 0, large window for the question)
- Show Text (Number 0, question text)
- Add Button (Number 1, text
Yes) - Add Button (Number 1, text
No) - Show Buttons (this event content)
Erasing everything together
When ending the question UI, erase buttons and background window with separate event contents:
- (Processing after operation completes)
- Reset Buttons ← Erase buttons
- Hide All Windows ← Erase background window
Hide All Windows does not erase buttons
Hide All Windows only erases background message windows. Buttons remain, so always combine with Reset Buttons.
Related Event Content
| Related event content | Purpose |
|---|---|
| Add Button | Add buttons in advance to display with this event content (always used as a pair) |
| Reset Buttons | Delete all added buttons at once |
| Add Choice | Add choices for the selection window (contrast with Add Button) |
| Show Selection Window | Display choices as a selection window (contrast with this event content) |
| Show Window | When placing a window as a background for buttons |
| Hide All Windows | Erase all background windows at once (buttons must be erased separately with Reset Buttons) |
Related Pages
| Page | Related content |
|---|---|
| UI Tab | Source of button design definitions |
| Event Tab | Reference for event transition destinations |
| Event Content List | List of all event contents |
Notes
Writing Show Buttons without Add Button is not an error
Even if this event content is executed in a state where Add Button has never been executed, it does not throw an error and proceeds as is to the next event content. During debugging, a common cause of buttons not appearing is forgetting to write Add Button, so be careful.
Internal data is all cleared after click
When any button is clicked, all button data is cleared internally. If you want to display the same buttons again after a click, arrange them from Add Button again.
Focus movement depends on placement
Up / Down / Left / Right focus movement is automatically calculated from placement. In diagonal or extremely distant placements, focus movement becomes unintended, so placing buttons aligned to the same row / column is recommended. See Add Button for details.
Automatic language-switch tracking
After displaying buttons with this event content, if you change the language in game settings, the button text is automatically redrawn in the new language. Users do not need to write any additional processing (text re-application by NOTIFICATION_TRANSLATION_CHANGED).
Usage with Reset Buttons
- Show the next button group after click: Reset Buttons unnecessary (auto-clears on click)
- Switch button groups without clicking (e.g. switch after timer expires): Explicitly execute Reset Buttons before rearranging with Add Button
