1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
use crateUnderlyingYarnCommand;
use crate*;
use *;
/// An event that is fired after a dialogue advances and wishes to present a line to the user.
/// A dialogue view should listen for this event and draw it to the screen.
/// Handling this event is **mandatory** for dialogue views.
/// An event that is fired after a dialogue advances and wishes to present a set of options to the user.
/// A dialogue view should listen for this event and draw it to the screen.
/// You need to handle this event by calling [`DialogueRunner::select_option`] with the ID found in the provided [`DialogueOption`]s.
/// Handling this event is **mandatory** for dialogue views.
/// An event that is fired after a dialogue advances and wishes to execute a command.
/// Events are generally handled by looking them up in the [`YarnCommands`] of a [`DialogueRunner`],
/// accessed via [`DialogueRunner::commands`] and [`DialogueRunner::commands_mut`].
/// However, a command is allowed much more freedom in its syntax than one might think, and as such, not all commands are registerable.
/// Thus, you can listen for this event and handle it yourself if you wish to build your own command syntax for e.g. a DSL.
/// Handling this event is optional for dialogue views.
/// An event that is fired after a node has been completed, i.e. all of its lines, commands, options, etc. have been exhausted.
/// Handling this event is **optional** for dialogue views.
/// An event that is fired after a node has been started, i.e. the first line, command, option, etc. has been executed.
/// Handling this event is **optional** for dialogue views
/// An event that is fired when a new node has been started. Contains the IDs of all lines in the node as a general hint
/// for asset providing systems to pre-load the lines. The lines are not guaranteed to be presented in the order of the IDs or at all.
/// Handling this event is **optional** for dialogue views.
/// An event that is fired when a dialogue has been started via [`DialogueRunner::start_node`]/
/// Handling this event is **optional** for dialogue views.
/// An event that is fired when a dialogue has been completed or stopped via [`DialogueRunner::stop`].