Closed joshgrrro closed 1 month ago
After some discussion with @KXI-System on Discord, the better approach seems to be implementing a "DismissOptions" method in the DialogueViewBase class.
Also sorry for the reopen/close I clicked the wrong thing twice 😅
What kind of change does this pull request introduce?
[ ] Bug Fix
[x] Feature
[ ] Something else
What is the current behavior?
No event is raised when an option is selected by a Dialogue View.
What is the new behavior (if this is a feature change)?
An new event is raised by the Dialogue Runner when an option is selected.
Does this pull request introduce a breaking change?
No breaking changes.
Other information:
Adding the onOptionSelected event allows multiple components to react to a selected option without coupling them to the Dialogue View responsible for the selection. Specifically, this allows multiple Dialogue Views to handle the RunOptions method without being coupled to one another-- they can be notified if another Dialogue View selects an option and take action accordingly.
Important notes:
Link to documentation pull request: https://github.com/YarnSpinnerTool/YSDocs/pull/58