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
|
use std::time::Duration;
use bevy::prelude::*;
use bevy_terminal_display::widgets::components::Widget;
use super::widgets::{DialogBox, DialogBoxWidget, OptionsBox, OptionsBoxWidget};
pub fn setup(mut commands: Commands) {
commands.spawn((
DialogBox,
Widget {
enabled: false,
depth: 0,
widget: Box::new(DialogBoxWidget::new(
None,
vec![],
Duration::from_millis(25),
)),
},
));
commands.spawn((
OptionsBox,
Widget {
enabled: false,
depth: 0,
widget: Box::<OptionsBoxWidget>::default(),
},
));
}
|