macro_rules! paragraphs {
($(#[$attr:meta])* $name:ident $(#[$impl_attr:meta])* { $($par:expr)* }) => { ... };
}Expand description
A macro for creating sequential paragraph Nodes
ยงExample
use epkard::*;
paragraphs! {
#[derive(Serialize, Deserialize)]
Example {
"This is the first paragraph."
"This is the second paragraph."
"This is the third paragraph."
}
}
impl Node for Example {
type State = ();
fn next(self, rt: &mut Runtime<Self>) -> Control<Self> {
// Print the text
rt.println(self.text());
// Wait for the user to continue
// rt.wait()?;
// Get the next paragraph
self.next()
}
}
run_default::<Example>();