diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-06-29 18:52:17 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-06-30 14:52:45 +0200 |
commit | 86da77091a6bb3eca31d5b8066cd95e981e4f8f7 (patch) | |
tree | beb4876b748d42b994937ab555cf82000d41d305 /videoplayer/src | |
parent | 8a51f59b47c832f38c260322d0115ef70d660bad (diff) | |
download | nihav-player-86da77091a6bb3eca31d5b8066cd95e981e4f8f7.tar.gz |
show time with middle button click
Diffstat (limited to 'videoplayer/src')
-rw-r--r-- | videoplayer/src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/videoplayer/src/main.rs b/videoplayer/src/main.rs index 6becffd..674a243 100644 --- a/videoplayer/src/main.rs +++ b/videoplayer/src/main.rs @@ -473,8 +473,12 @@ impl Player { canvas.copy(disp_queue.get_last_texture(&self.osd), None, None).expect("blitting failure"); canvas.present(); } - if let Event::MouseButtonDown {mouse_btn: MouseButton::Right, ..} = event { - self.toggle_pause(); + if let Event::MouseButtonDown {mouse_btn, ..} = event { + match mouse_btn { + MouseButton::Right => self.toggle_pause(), + MouseButton::Middle => self.osd.toggle(), + _ => {}, + }; } if let Event::KeyDown {keycode: Some(keycode), keymod, ..} = event { match keycode { |