]> git.nihav.org Git - nihav-player.git/commitdiff
show time with middle button click
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 29 Jun 2023 16:52:17 +0000 (18:52 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 30 Jun 2023 12:52:45 +0000 (14:52 +0200)
videoplayer/src/main.rs

index 6becffd09bd7e897b3b40de86a10895a4d3797b8..674a243ae49ab9d55e9a3198deb63781e6deb01d 100644 (file)
@@ -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 {