Settings, took care of warnings
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use std::{collections::{HashMap, HashSet}, ops::Deref, sync::{Arc, Mutex}};
|
||||
use std::{collections::{HashMap, HashSet}, sync::{Arc, Mutex}};
|
||||
use egui::{ViewportBuilder, ViewportId};
|
||||
use crate::GuiState;
|
||||
|
||||
mod error;
|
||||
mod settings;
|
||||
|
||||
lazy_static::lazy_static!(
|
||||
static ref WINDOWS: Arc<Mutex<HashMap<WindowId, Box<dyn Window>>>> = Arc::new(Mutex::new(HashMap::new()));
|
||||
@@ -16,6 +17,7 @@ pub trait Window: std::fmt::Debug + Send {
|
||||
|
||||
#[derive(Debug, Clone, Hash, PartialEq, PartialOrd, Ord, Eq)]
|
||||
pub enum WindowId {
|
||||
Settings,
|
||||
Error
|
||||
}
|
||||
|
||||
@@ -49,7 +51,6 @@ impl Windows {
|
||||
if self.is_open(&win_id) {
|
||||
ctx.show_viewport_immediate(vp_id.clone(), builder.clone(), |ctx, _vp_class| {
|
||||
ctx.input(|inp| {
|
||||
// println!("CLose requested: {}",inp.viewport().close_requested() );
|
||||
self.toggle(win_id, !inp.viewport().close_requested());
|
||||
});
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
|
||||
Reference in New Issue
Block a user