This commit is contained in:
2026-03-25 00:56:58 -07:00
parent 96f327e4dc
commit c31402c8f1
5 changed files with 89 additions and 12 deletions

View File

@@ -1113,6 +1113,13 @@ mp.register_script_message('close-menu', function(type)
if Menu:is_open(type) then Menu:close() end
end)
mp.register_script_message('sync-cursor', function()
cursor.last_events.primary_down = nil
cursor.last_events.primary_up = nil
cursor.last_events.secondary_down = nil
cursor.last_events.secondary_up = nil
cursor.last_events.primary_click = nil
cursor.last_events.secondary_click = nil
cursor.history:clear()
local mouse = mp.get_property_native('mouse-pos')
if type(mouse) == 'table' and mouse.hover and mouse.x and mouse.y then
cursor:move(mouse.x, mouse.y)