pull/3/head
Milk.H 2023-03-24 08:47:49 +01:00
parent 81be82d0c6
commit bd90426dc6
No known key found for this signature in database
GPG Key ID: 3D9DAE46AAC37BD8
2 changed files with 11 additions and 12 deletions

View File

@ -26,7 +26,7 @@ pub enum Callback
MainMenu, MainMenu,
} }
#[derive(Clone)] #[derive(Clone, PartialEq)]
pub enum OpenWindows { pub enum OpenWindows {
ModelInfo, ModelInfo,
TestWind, TestWind,
@ -121,17 +121,18 @@ impl Debug {
let mut id = 0; let mut id = 0;
for (hashId, windowType) in &self.windows for (hashId, windowType) in &self.windows
{ {
if let _window = windowType {id = *hashId; println!("found a match!")}; if *windowType == window {
match windowType id = *hashId;
{ break;
window => id = *hashId,
_ => ()
} }
} }
if id !=0
{
self.windows.remove(&id); self.windows.remove(&id);
self.free_ids.push(id); self.free_ids.push(id);
} }
}
fn displayTest(ui: &mut imgui::Ui, testI: &mut info::testI) -> Vec<dEvent> fn displayTest(ui: &mut imgui::Ui, testI: &mut info::testI) -> Vec<dEvent>
{ {

View File

@ -28,8 +28,6 @@ use sdl2::pixels::Color;
use sdl2::keyboard::Keycode; use sdl2::keyboard::Keycode;
use sdl2::event::Event; use sdl2::event::Event;
use std::sync::mpsc::Receiver;
use std::ptr;
use std::mem; use std::mem;
use std::os::raw::c_void; use std::os::raw::c_void;
use std::path::Path; use std::path::Path;