Copyright © 2025-2026 Candy ArtsReacting to Choices
Your code is informed of what happens in a menu through hook functions, and a menu scene of your own can send events of its own to the Dialogue. This is useful for a sound on each pick, a journal that records the player's answers, or a preview displayed when a choice is hovered.
The Choice Hook
Each pick calls the x_choice_selected() hook function, in User_Data/Functions, before the choice switches category and before its action runs. candy_args contains:
| Key | Value |
| "caller" | The Engine running the Choice_List command. |
| "menu" | The menu node. |
| "category", "choice" | The names of the category and the choice picked. |
| "button" | The button node. |
| "choice_data" | The choice's keys, as written in the Line. |
| Hook | Called |
| x_initialization_finished() | Once the menu, its categories and its buttons are built, before its timers start. |
| x_menu_closing() | When a picked choice is about to close the menu, while the menu is still displayed. candy_args adds the category, the choice, the button and the Finish type. |