Added info, warn, and error toasts
This commit is contained in:
@@ -2,6 +2,8 @@ use std::{collections::{HashMap, HashSet}, sync::{Arc, Mutex}};
|
||||
use egui::{ViewportBuilder, ViewportId};
|
||||
use crate::GuiState;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
mod debug;
|
||||
mod error;
|
||||
mod settings;
|
||||
|
||||
@@ -18,7 +20,9 @@ pub trait Window: std::fmt::Debug + Send {
|
||||
#[derive(Debug, Clone, Hash, PartialEq, PartialOrd, Ord, Eq)]
|
||||
pub enum WindowId {
|
||||
Settings,
|
||||
Error
|
||||
Error,
|
||||
#[cfg(debug_assertions)]
|
||||
Debug
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -38,6 +42,8 @@ impl Windows {
|
||||
pub fn add_all_windows(&mut self) {
|
||||
self.add_new_window(WindowId::Error, "Error!", Box::<error::ErrorW>::default());
|
||||
self.add_new_window(WindowId::Settings, "Settings", Box::<settings::SettingsW>::default());
|
||||
#[cfg(debug_assertions)]
|
||||
self.add_new_window(WindowId::Debug, "Debug", Box::<debug::DebugW>::default());
|
||||
}
|
||||
|
||||
pub fn add_new_window(&mut self, id: WindowId, title: &str, cb: Box<dyn Window>) {
|
||||
|
||||
Reference in New Issue
Block a user