mirror of
https://github.com/jellyfin/jellyfin-mpv-shim.git
synced 2024-11-23 05:59:43 +00:00
Changed capture_mouse to be more generic (#180)
* Changed capture_mouse to triggered_menu `capture_mouse` event occurs when spawning menu, it is not related directly to mouse. Therefore, `triggered_menu` is more general as this event can be used for various additions other than mouse capture in lua. * Changed capture_mouse to triggered_menu Renamed `capture_mouse` to `triggered_menu` `capture_mouse` event occurs when spawning menu, it is not related directly to mouse. Therefore, `triggered_menu` is more general as this event can be used for various additions other than mouse capture in lua.
This commit is contained in:
parent
86cda79084
commit
a33bbc3f6e
@ -125,7 +125,7 @@ class OSDMenu(object):
|
||||
self.playerManager.set_osd_settings("#CC333333", 40)
|
||||
|
||||
self.playerManager.enable_osc(False)
|
||||
self.playerManager.capture_mouse(True)
|
||||
self.playerManager.triggered_menu(True)
|
||||
|
||||
self.menu_title = _("Main Menu")
|
||||
self.menu_selection = 0
|
||||
@ -199,7 +199,7 @@ class OSDMenu(object):
|
||||
self.playerManager.show_text("", 0, 0)
|
||||
|
||||
self.playerManager.enable_osc(True)
|
||||
self.playerManager.capture_mouse(False)
|
||||
self.playerManager.triggered_menu(False)
|
||||
self.playerManager.force_window(False)
|
||||
|
||||
if not self.playerManager.playback_is_aborted():
|
||||
|
@ -954,7 +954,7 @@ class PlayerManager(object):
|
||||
if hasattr(self._player, "osc"):
|
||||
self._player.osc = enabled
|
||||
|
||||
def capture_mouse(self, enabled: bool):
|
||||
def triggered_menu(self, enabled: bool):
|
||||
self._player.command(
|
||||
"script-message", "shim-menu-enable", "True" if enabled else "False"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user