这是我的代码:
extern crate cursive;
use cursive::Cursive;
use cursive::views::{SelectView, Dialog};
use cursive::align::HAlign;
fn main() {
let mut time_select = SelectView::new().h_align(HAlign::Center);
time_select.add_item("Short", 1);
time_select.add_item("Medium", 5);
time_select.add_item("Long", 10);
let mut siv = Cursive::new();
siv.add_layer(Dialog::around(time_select).title("How long is your wait?"));
siv.run();
}
这是结果:
这发生在多个终端仿真器上。我该如何解决这个问题?