diff --git a/.gitignore b/.gitignore index ea8c4bf..d193843 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ /target +*~ +Cargo.lock +test_files/ diff --git a/src/main.rs b/src/main.rs index 3d03be4..9b12f6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,6 @@ struct RustDoomLauncher { config_filename: PathBuf, config: Option, config_tried: bool, - wad_summary: String, command_manager: CommandManager, display_command: bool, add_stuff_window_displayed: bool, @@ -60,7 +59,6 @@ impl Default for RustDoomLauncher { config_filename: default_save_filename(), config: None, // TODO: put the config_filename in the config stuct - or something config_tried: false, - wad_summary: "".to_string(), display_command: false, add_stuff_window_displayed: false, selected_file_type: FileType::Pwad, @@ -82,16 +80,11 @@ impl RustDoomLauncher { if let Some(config) = &self.config { if let Some(iwads) = &config.iwads { for iwad in iwads { - let mut iwad = iwad.clone(); - iwad.info_text = Some("I'm sure you know what's in that bloody IWAD".to_string()); self.iwad_manager.add(&iwad); } } if let Some(pwads) = &config.pwads { for pwad in pwads { - let mut pwad = pwad.clone(); - pwad.info_text = get_summary(&pwad.path); - println!("{:?}", pwad); self.pwad_manager.add(&pwad.clone()); } } @@ -222,7 +215,6 @@ impl eframe::App for RustDoomLauncher { .clicked() { add_pos = Some(pos); - self.wad_summary = iwad.info_text.as_ref().unwrap().clone(); } if ui.button("❌").clicked() { remove_pos = Some(pos); @@ -256,9 +248,6 @@ impl eframe::App for RustDoomLauncher { .clicked() { add_pos = Some(pos); - if let Some(txt) = pwad.info_text.clone() { - self.wad_summary = txt; - } } if ui.button("❌").clicked() { remove_pos = Some(pos); @@ -276,13 +265,6 @@ impl eframe::App for RustDoomLauncher { .add_pwads(&self.pwad_manager.get_current()) } }); - let window_size = frame.info().window_info.size; - ui.set_max_height(300.0); - ui.add( - egui::TextEdit::multiline(&mut self.wad_summary) - .desired_width(window_size[0] / 1.6) - .desired_rows(20) - ); }); ui.separator(); ui.horizontal_wrapped(|ui| {