new version of egui

master
aintercourse 2 years ago
parent 434f0caa32
commit 8e5cd4d778

1463
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -9,7 +9,7 @@ publish = false
[dependencies] [dependencies]
eframe = "0.19.0" eframe = "0.21.3"
serialport= "4.1.0" serialport= "4.1.0"
async-std = "*" async-std = "*"
local-encoding="*" local-encoding="*"

@ -29,6 +29,7 @@ enum ScreenCurrent {
Diagnosis, Diagnosis,
WorkCycle, WorkCycle,
PortSelection, PortSelection,
CalibrationStend,
} }
impl Default for ScreenCurrent { impl Default for ScreenCurrent {
@ -44,7 +45,7 @@ struct Screen {
#[derive(Debug)] #[derive(Debug)]
struct ScreenSelector { struct ScreenSelector {
screen: [Screen; 5], screen: [Screen; 6],
} }
impl Default for ScreenSelector { impl Default for ScreenSelector {
@ -71,6 +72,10 @@ impl Default for ScreenSelector {
id: (ScreenCurrent::PortSelection), id: (ScreenCurrent::PortSelection),
name: ("Выбор порта".to_string()), name: ("Выбор порта".to_string()),
}, },
Screen {
id: (ScreenCurrent::CalibrationStend),
name: ("Калибровочный стенд".to_string()),
},
], ],
} }
} }
@ -157,9 +162,9 @@ struct MyApp {
} }
impl eframe::App for MyApp { impl eframe::App for MyApp {
fn clear_color(&self, _visuals: &egui::Visuals) -> egui::Rgba { //fn clear_color(&self, _visuals: &egui::Visuals) -> egui::Rgba {
egui::Rgba::TRANSPARENT // Make sure we don't paint anything behind the rounded corners // egui::Rgba::TRANSPARENT // Make sure we don't paint anything behind the rounded corners
} //}
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
let (tx, rx): (Sender<u8>, Receiver<u8>) = mpsc::channel(); let (tx, rx): (Sender<u8>, Receiver<u8>) = mpsc::channel();

Loading…
Cancel
Save