mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Add feature to disconnect a shortcut (#160)
This commit is contained in:
+12
-1
@@ -17,7 +17,7 @@ use super::{
|
||||
},
|
||||
ui_images::{get_import_image, get_logo, get_logo_icon},
|
||||
ui_import_games::FetcStatus,
|
||||
BackupState, ImageSelectState,
|
||||
BackupState, DiconnectState, ImageSelectState,
|
||||
};
|
||||
|
||||
const SECTION_SPACING: f32 = 25.0;
|
||||
@@ -39,6 +39,7 @@ pub struct MyEguiApp {
|
||||
pub(crate) heroic_games: Option<Vec<HeroicGame>>,
|
||||
pub(crate) image_selected_state: ImageSelectState,
|
||||
pub(crate) backup_state: BackupState,
|
||||
pub(crate) disconect_state: DiconnectState,
|
||||
}
|
||||
|
||||
impl MyEguiApp {
|
||||
@@ -55,6 +56,7 @@ impl MyEguiApp {
|
||||
heroic_games: None,
|
||||
image_selected_state: ImageSelectState::default(),
|
||||
backup_state: BackupState::default(),
|
||||
disconect_state: DiconnectState::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,6 +67,7 @@ enum Menues {
|
||||
Settings,
|
||||
Images,
|
||||
Backup,
|
||||
Disconnect,
|
||||
}
|
||||
|
||||
impl Default for Menues {
|
||||
@@ -106,6 +109,11 @@ impl App for MyEguiApp {
|
||||
.selectable_value(&mut self.selected_menu, Menues::Backup, "Backup")
|
||||
.changed();
|
||||
|
||||
changed = changed
|
||||
|| ui
|
||||
.selectable_value(&mut self.selected_menu, Menues::Disconnect, "Disconnect")
|
||||
.changed();
|
||||
|
||||
if changed {
|
||||
self.backup_state.available_backups = None;
|
||||
}
|
||||
@@ -172,6 +180,9 @@ impl App for MyEguiApp {
|
||||
Menues::Backup => {
|
||||
self.render_backup(ui);
|
||||
}
|
||||
Menues::Disconnect => {
|
||||
self.render_disconnect(ui);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user