Skip to content

Commit

Permalink
Change mouse handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AeEn123 committed Dec 19, 2024
1 parent b2b1d06 commit 90163db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,14 @@ impl egui_dock::TabViewer for TabViewer<'_> {
ui.painter().rect_filled(rect, 0.0, background_colour);

// Handle the click/double click
if response.clicked() && is_selected {
double_click(cache_directory.clone(), file_name.to_string(), tab.to_string(), self.swapping, self.swapping_asset_a);
} else if response.clicked() && !*self.renaming {
if response.clicked() || response.secondary_clicked() && !*self.renaming {
*self.selected = Some(i);
}

if response.double_clicked() {
double_click(cache_directory.clone(), file_name.to_string(), tab.to_string(), self.swapping, self.swapping_asset_a);
}

// Handle keyboard scrolling
if scroll_to == Some(i) {
navigation_accepted = true;
Expand Down

0 comments on commit 90163db

Please sign in to comment.