switching to egui

main
aprzn 2 years ago
parent 3a7ea1e7eb
commit 079d84aaeb

1491
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
package] [package]
name = "pipedash" name = "pipedash"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
@ -6,6 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
eframe = {version = "0.20.1"}
rodio = {version = "0.16.0"} rodio = {version = "0.16.0"}
home = {version = "0.5.4"} home = {version = "0.5.4"}
base64 = {version = "0.21.0"} base64 = {version = "0.21.0"}

@ -1,5 +1,9 @@
mod gd; mod gd;
use eframe;
use eframe::egui;
use std::boxed::Box;
/*use iced::{ /*use iced::{
widget::{ widget::{
button, button,
@ -76,9 +80,38 @@ impl Application for Guider {
} }
} }
*/
struct PipeDash {
selected: Option<i32>,
}
impl PipeDash {
fn new(_cc: &eframe::CreationContext) -> Self {
Self {selected: None}
}
}
impl eframe::App for PipeDash {
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
egui::SidePanel::left("level_picker").show(ctx, |ui| {
if ui.selectable_label(self.selected == Some(0), "lbl 1").clicked() {
self.selected = Some(0);
}
if ui.selectable_label(self.selected == Some(1), "lbl 2").clicked() {
self.selected = Some(1);
}
});
egui::CentralPanel::default().show(ctx, |ui| {
ui.label("hello world!");
});
}
}
fn main() -> iced::Result { fn main() {
println!("{:?}", gd::get_outer_levels()); println!("{:?}", gd::get_outer_levels());
Guider::run(Settings::default()) let app: PipeDash;
let opts = eframe::NativeOptions::default();
eframe::run_native("PipeDash", opts, Box::new(|cc| Box::new(PipeDash::new(cc))));
} }
*/

Loading…
Cancel
Save