diff --git a/Cargo.toml b/Cargo.toml index 8a98899..25ff0ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "town-of-us-updater" -version = "4.0.1" +version = "4.0.2" edition = "2021" build = "src/build.rs" diff --git a/src/main.rs b/src/main.rs index a9ccee5..e19fdbb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ pub struct AppData { pub among_us_path: String, pub installs_path: String, pub version: SemVer, - pub initialized: bool, + pub delete_mode: bool, pub among_us_version: AmongUsVersion, pub data_path: String, pub app_state: GlobalAppState, @@ -71,7 +71,7 @@ impl Default for AppData { minor: 0, patch: 0, }, - initialized: false, + delete_mode: false, among_us_version: AmongUsVersion::default(), data_path: String::new(), app_state: GlobalAppState::Initialized, @@ -162,7 +162,7 @@ impl AppData { } } - if !self.initialized { + if !self.delete_mode { ui.set_visible(false); } @@ -193,7 +193,7 @@ impl eframe::App for AppData { self.update_installs_list = false; } egui::TopBottomPanel::bottom("bottom_panel").show(ctx, |ui| { - ui.checkbox(&mut self.initialized, "DELETE MODE"); + ui.checkbox(&mut self.delete_mode, "DELETE MODE"); }); egui::CentralPanel::default().show(ctx, |ui| { self.draw_layout(ui); @@ -369,7 +369,6 @@ impl AppData { new_installed_path.to_str().unwrap(), ); } - self.initialized = !self.initialized; self.app_state = GlobalAppState::Initialized; self.update_installs_list = true; } @@ -518,7 +517,7 @@ fn main() { among_us_path: String::from(among_us_folder.clone().to_str().unwrap()), installs_path: String::from(installs_path.clone().to_str().unwrap()), version: SemVer::from(version), - initialized: false, + delete_mode: false, among_us_version: AmongUsVersion::default(), data_path: String::from(data_path.clone().to_str().unwrap()), app_state: GlobalAppState::Initializing(InitializingState::StartingGUI),