Only consider left clicks on the scrollbar

This commit is contained in:
Guldoman 2022-10-16 04:40:03 +02:00
parent 5aaa5ab273
commit 6ca56fee1a
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 2 additions and 0 deletions

View File

@ -179,12 +179,14 @@ end
---representing the percent of the position.
---@return boolean|number
function Scrollbar:on_mouse_pressed(button, x, y, clicks)
if button ~= "left" then return end
x, y = self:real_to_normal(x, y)
return self:_on_mouse_pressed_normal(button, x, y, clicks)
end
---Updates the scrollbar dragging status
function Scrollbar:on_mouse_released(button, x, y)
if button ~= "left" then return end
self.dragging = false
end