From cffb580036dea57dbc70a9fa847514bf9481d5e1 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 13 Aug 2024 17:20:19 +0200 Subject: [PATCH] feat(info): add info diag --- Cargo.toml | 1 + src/app.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87e758e..595c499 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,3 +25,4 @@ libpt = { version = "0.6.0", features = ["cli"] } clap = { version = "4.5.15", features = ["derive"] } image = "0.25.2" rand = "0.8.5" +rfd = "0.14.1" diff --git a/src/app.rs b/src/app.rs index 0751055..cdee50a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -54,6 +54,10 @@ impl RollatorApp { pub fn new_with_cli() -> Self { Self::parse() } + + pub fn info_diag(&mut self) { + let mut diag = rfd::MessageDialog::new(); + } } impl eframe::App for RollatorApp { @@ -78,10 +82,8 @@ impl eframe::App for RollatorApp { if ui.button("Quit").clicked() { ctx.send_viewport_cmd(egui::ViewportCommand::Close); } - }); - ui.menu_button("AAAA", |ui| { - if ui.button("Quit").clicked() { - ctx.send_viewport_cmd(egui::ViewportCommand::Close); + if ui.button("Info").clicked() { + self.info_diag(); } }); ui.add_space(16.0);