started working on dialogs

This commit is contained in:
FantasyPvP
2024-03-20 18:03:15 +00:00
parent b0da71942a
commit e80df5100f
11 changed files with 158 additions and 464 deletions
+13
View File
@@ -18,6 +18,7 @@ use crate::user::lib::libgui::{
cg_inputs::CgLineEdit,
};
use crate::user::lib::libgui::cg_core::{CgTextInput, Widget};
use crate::user::lib::libgui::cg_widgets::CgDialog;
lazy_static! {
pub static ref CMD: Mutex<CommandHandler> = Mutex::new(CommandHandler::new());
@@ -253,6 +254,18 @@ struct CmdHistory {
}
async fn setup_ui() {
let dialog = CgDialog::new(
Dimensions::new(40, 10),
String::from("test dialog"),
String::from("dialog body"),
String::from("[dialog footer]")
);
if let Ok(frame) = dialog.render() {
frame.write_to_screen().unwrap();
}
return;
serial_println!("idk");
let label= Widget::insert(CgLabel::new(
String::from("test label"),