Skip to content

Commit 1bf28f3

Browse files
committed
doc: Adjusted #[signal] doc with example using parameter.
1 parent 88d8ed0 commit 1bf28f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

godot-macros/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ use crate::util::ident;
323323
///
324324
/// # Signals
325325
///
326-
/// The `#[signal]` attribute is quite limited at the moment and can only be used for parameter-less signals.
326+
/// The `#[signal]` attribute is quite limited at the moment. The functions it decorates (the signals) can accept parameters.
327327
/// It will be fundamentally reworked.
328328
///
329329
/// ```no_run
@@ -336,6 +336,9 @@ use crate::util::ident;
336336
/// impl MyClass {
337337
/// #[signal]
338338
/// fn some_signal();
339+
///
340+
/// #[signal]
341+
/// fn some_signal_with_parameters(my_parameter: Gd<Node>);
339342
/// }
340343
/// ```
341344
///

0 commit comments

Comments
 (0)