From a458d33711f83dfd45d0376a1cd66d28d6bed370 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 23 Jan 2026 13:57:39 -0800 Subject: create input handler module --- osd.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'osd.lua') diff --git a/osd.lua b/osd.lua index eb7feda..6a9f0c2 100644 --- a/osd.lua +++ b/osd.lua @@ -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 -- cgit v1.2.3-70-g09d2