#[cfg(feature = "ui")]
use crate::extract_help;
#[cfg(feature = "ui")]
use cursive::traits::{Resizable, Scrollable};
#[cfg(feature = "ui")]
use cursive::views::{Dialog, ScrollView, TextView};
#[cfg(feature = "ui")]
pub fn build_help_view() -> Dialog {
let help_text = extract_help::get_help_info();
let scrollable_text = ScrollView::new(TextView::new(help_text))
.scrollable()
.fixed_height(20)
.fixed_width(60);
Dialog::around(scrollable_text)
.title("帮助")
.button("关闭", |s| {
let _ = s.pop_layer();
})
}