Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds callbacks for the Menu statement
These allow one to execute code before a menu is displayed to the player (and potentially choose one of the menu options automatically), and execute code after the player has picked a menu choice. This change was made just to support Cute Demon Crashers! replay feature, and isn't intended to be merged back in the Ren'Py main branch. Although menu callbacks would probably be a nice thing. Two new configurations have been added to support this change: - `renpy.config.menu_choice_before_callback` is a function that takes in a list of menu choices, and the name of the node (which uniquely identifies it in the game), and can either return None, or an Int. If an Int is returned, it's assumed to be the index of the choice that should be automatically selected for the player. - `renpy.config.menu_choice_after_callback` is a function that takes in the option the user has selected (an Int representing the index of the choice), and the name of the Node.
- Loading branch information