Only consider left clicks on the scrollbar
This commit is contained in:
parent
5aaa5ab273
commit
6ca56fee1a
|
@ -179,12 +179,14 @@ end
|
||||||
---representing the percent of the position.
|
---representing the percent of the position.
|
||||||
---@return boolean|number
|
---@return boolean|number
|
||||||
function Scrollbar:on_mouse_pressed(button, x, y, clicks)
|
function Scrollbar:on_mouse_pressed(button, x, y, clicks)
|
||||||
|
if button ~= "left" then return end
|
||||||
x, y = self:real_to_normal(x, y)
|
x, y = self:real_to_normal(x, y)
|
||||||
return self:_on_mouse_pressed_normal(button, x, y, clicks)
|
return self:_on_mouse_pressed_normal(button, x, y, clicks)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Updates the scrollbar dragging status
|
---Updates the scrollbar dragging status
|
||||||
function Scrollbar:on_mouse_released(button, x, y)
|
function Scrollbar:on_mouse_released(button, x, y)
|
||||||
|
if button ~= "left" then return end
|
||||||
self.dragging = false
|
self.dragging = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue