mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Update all dependencies (#208)
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ impl MyEguiApp {
|
||||
ui.label("No backups found, they will be created every time you run import");
|
||||
} else {
|
||||
ScrollArea::vertical()
|
||||
.stick_to_right()
|
||||
.stick_to_right(true)
|
||||
.auto_shrink([false, true])
|
||||
.show(ui, |ui| {
|
||||
for backup_path in available_backups {
|
||||
|
||||
@@ -47,7 +47,7 @@ impl MyEguiApp {
|
||||
let mut redraw = 0;
|
||||
set_scroll_style(ui);
|
||||
ScrollArea::vertical()
|
||||
.stick_to_right()
|
||||
.stick_to_right(true)
|
||||
.auto_shrink([false, true])
|
||||
.show(ui, |ui| {
|
||||
ui.reset_style();
|
||||
|
||||
+20
-13
@@ -264,7 +264,11 @@ impl MyEguiApp {
|
||||
//Need to load
|
||||
let image_data = load_image_from_path(&image.thumbnail_path);
|
||||
if let Some(image_data) = image_data {
|
||||
let handle = ui.ctx().load_texture(&image_key, image_data);
|
||||
let handle = ui.ctx().load_texture(
|
||||
&image_key,
|
||||
image_data,
|
||||
egui::TextureFilter::Linear,
|
||||
);
|
||||
*state.value_mut() = TextureState::Loaded(handle);
|
||||
}
|
||||
ui.ctx().request_repaint();
|
||||
@@ -327,17 +331,16 @@ impl MyEguiApp {
|
||||
}
|
||||
|
||||
fn ensure_steam_users_loaded(&mut self) {
|
||||
if self.image_selected_state.settings_error.is_none() && self.image_selected_state.steam_users.is_none() {
|
||||
if self.image_selected_state.settings_error.is_none()
|
||||
&& self.image_selected_state.steam_users.is_none()
|
||||
{
|
||||
let paths = get_shortcuts_paths(&self.settings.steam);
|
||||
match paths{
|
||||
Ok(paths) => {
|
||||
self.image_selected_state.steam_users = Some(paths)
|
||||
},
|
||||
Err(err) => {
|
||||
match paths {
|
||||
Ok(paths) => self.image_selected_state.steam_users = Some(paths),
|
||||
Err(err) => {
|
||||
self.image_selected_state.settings_error = Some(format!("Could not find user steam location, error message: {} , try to clear the steam location field in settings to let BoilR find it itself",err));
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,14 +348,14 @@ impl MyEguiApp {
|
||||
self.ensure_games_loaded();
|
||||
self.ensure_steam_users_loaded();
|
||||
|
||||
if let Some(error_message) = &self.image_selected_state.settings_error{
|
||||
if let Some(error_message) = &self.image_selected_state.settings_error {
|
||||
ui.label(error_message);
|
||||
return;
|
||||
}
|
||||
|
||||
let mut action = UserAction::NoAction;
|
||||
ScrollArea::vertical()
|
||||
.stick_to_right()
|
||||
.stick_to_right(true)
|
||||
.auto_shrink([false, true])
|
||||
.show(ui, |ui| {
|
||||
ui.reset_style();
|
||||
@@ -479,7 +482,9 @@ impl MyEguiApp {
|
||||
if !loaded && path.exists() {
|
||||
let image = load_image_from_path(&path);
|
||||
if let Some(image) = image {
|
||||
let texture = ui.ctx().load_texture(&key, image);
|
||||
let texture = ui
|
||||
.ctx()
|
||||
.load_texture(&key, image, egui::TextureFilter::Linear);
|
||||
state
|
||||
.image_handles
|
||||
.insert(key, TextureState::Loaded(texture));
|
||||
@@ -603,7 +608,9 @@ impl MyEguiApp {
|
||||
let (path, key) = shortcut.key(image_type, Path::new(&user.steam_user_data_folder));
|
||||
let image = load_image_from_path(&path);
|
||||
if let Some(image) = image {
|
||||
let texture = ui.ctx().load_texture(&key, image);
|
||||
let texture = ui
|
||||
.ctx()
|
||||
.load_texture(&key, image, egui::TextureFilter::Linear);
|
||||
state
|
||||
.image_handles
|
||||
.insert(key, TextureState::Loaded(texture));
|
||||
|
||||
@@ -55,7 +55,7 @@ impl MyEguiApp {
|
||||
scroll_style.visuals.widgets.hovered.bg_fill = EXTRA_BACKGROUND_COLOR;
|
||||
|
||||
ScrollArea::vertical()
|
||||
.stick_to_right()
|
||||
.stick_to_right(true)
|
||||
.auto_shrink([false,true])
|
||||
.show(ui,|ui| {
|
||||
ui.reset_style();
|
||||
|
||||
@@ -23,7 +23,7 @@ impl MyEguiApp {
|
||||
scroll_style.visuals.widgets.hovered.bg_fill = EXTRA_BACKGROUND_COLOR;
|
||||
|
||||
ScrollArea::vertical()
|
||||
.stick_to_right()
|
||||
.stick_to_right(true)
|
||||
.auto_shrink([false, true])
|
||||
.show(ui, |ui| {
|
||||
ui.reset_style();
|
||||
|
||||
+4
-4
@@ -243,21 +243,21 @@ impl MyEguiApp {
|
||||
fn get_import_image(&mut self, ui: &mut egui::Ui) -> &mut TextureHandle {
|
||||
self.ui_images.import_button.get_or_insert_with(|| {
|
||||
// Load the texture only once.
|
||||
ui.ctx().load_texture("import_image", get_import_image())
|
||||
ui.ctx().load_texture("import_image", get_import_image(),egui::TextureFilter::Linear)
|
||||
})
|
||||
}
|
||||
|
||||
fn get_save_image(&mut self, ui: &mut egui::Ui) -> &mut TextureHandle {
|
||||
self.ui_images.save_button.get_or_insert_with(|| {
|
||||
// Load the texture only once.
|
||||
ui.ctx().load_texture("save_image", get_save_image())
|
||||
ui.ctx().load_texture("save_image", get_save_image(),egui::TextureFilter::Linear)
|
||||
})
|
||||
}
|
||||
|
||||
fn get_logo_image(&mut self, ui: &mut egui::Ui) -> &mut TextureHandle {
|
||||
self.ui_images.logo_32.get_or_insert_with(|| {
|
||||
// Load the texture only once.
|
||||
ui.ctx().load_texture("logo32", get_logo())
|
||||
ui.ctx().load_texture("logo32", get_logo(),egui::TextureFilter::Linear)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@ pub fn run_sync() {
|
||||
app.run_sync(true);
|
||||
}
|
||||
|
||||
pub fn run_ui(args: Vec<String>) -> Result<(), Box<dyn Error>> {
|
||||
pub fn run_ui(args: Vec<String>){
|
||||
let app = MyEguiApp::new();
|
||||
let no_v_sync = args.contains(&"--no-vsync".to_string());
|
||||
let native_options = eframe::NativeOptions {
|
||||
|
||||
Reference in New Issue
Block a user