From 6ca56fee1a7a517975fde64d20c5efe41eca34ac Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sun, 16 Oct 2022 04:40:03 +0200 Subject: [PATCH] Only consider left clicks on the scrollbar --- data/core/scrollbar.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/core/scrollbar.lua b/data/core/scrollbar.lua index 77cefeeb..889d0f28 100644 --- a/data/core/scrollbar.lua +++ b/data/core/scrollbar.lua @@ -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