Skip to content

Commit e955a15

Browse files
committed
add more to the migration
1 parent af061df commit e955a15

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

docs/src/Migration/0.14-to-0.15-alpha.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,28 @@ pub enum Recipients {
165165
}
166166
```
167167

168-
This aligns with how scripts are associated with contexts better.
168+
This aligns with how scripts are associated with contexts better.
169+
170+
## `ScriptCallbackEvent` changes
171+
172+
The language for recipients is now controlled through the `language` field of the `ScriptCallbackEvent`. This allows for more flexibility in how callbacks are handled, especially when multiple languages are involved.
173+
174+
If no language is specified, the callback will apply to all languages.
175+
176+
```diff,ignore
177+
#[derive(Clone, Event, Debug)]
178+
#[non_exhaustive]
179+
pub struct ScriptCallbackEvent {
180+
/// The label of the callback
181+
pub label: CallbackLabel,
182+
/// The recipients of the callback
183+
pub recipients: Recipients,
184+
/// The language of the callback, if unspecified will apply to all languages
185+
-
186+
+ pub language: Option<Language>
187+
/// The arguments to the callback
188+
pub args: Vec<ScriptValue>,
189+
/// Whether the callback should emit a response event
190+
pub trigger_response: bool,
191+
}
192+
```

0 commit comments

Comments
 (0)