diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-23 13:57:39 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-23 13:57:39 -0800 |
| commit | a458d33711f83dfd45d0376a1cd66d28d6bed370 (patch) | |
| tree | b49c2d30d0e0c1649e8e62c1b0580ca2dcbc5c80 /osd.lua | |
| parent | af9a5c2c065be5fecf9fbbea6db58ad746e3a582 (diff) | |
| download | mpv-iptv-menu-a458d33711f83dfd45d0376a1cd66d28d6bed370.tar.gz mpv-iptv-menu-a458d33711f83dfd45d0376a1cd66d28d6bed370.tar.xz | |
create input handler module
Diffstat (limited to 'osd.lua')
| -rw-r--r-- | osd.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -712,6 +712,7 @@ function mt:update_mstate(mactive) val = self:mouse_menu_line(self.mpos) if val then t.target = 'menu' + t.hitbox = 'menu:' .. val t.line = val t.option_line = val - #self.out.titles - 1 goto common @@ -719,6 +720,7 @@ function mt:update_mstate(mactive) ::common:: + t.hitbox = t.hitbox or t.target t.over_btn_area = self:mouse_over_btn_area(self.mpos) ::update:: @@ -727,10 +729,8 @@ function mt:update_mstate(mactive) local t_hov = (t.target == 'menu' or t.target == 'scrollbar') local ms_hov = (ms.target == 'menu' or ms.target == 'scrollbar') if (t_hov or ms_hov) and - (t.target ~= ms.target or - not mactive ~= not self.mactive or - (t.target == 'menu' and - t.line ~= ms.line)) then + (t.hitbox ~= ms.hitbox or + not mactive ~= not self.mactive) then self.needs_render_bg = true end |
