Added in double, and triple clicking.
This commit is contained in:
+2
-1
@@ -76,12 +76,13 @@ function View:scrollbar_overlaps_point(x, y)
|
||||
end
|
||||
|
||||
|
||||
local click_prefixes = { "", "d", "t" }
|
||||
function View:on_mouse_pressed(button, x, y, clicks)
|
||||
if self:scrollbar_overlaps_point(x, y) then
|
||||
self.dragging_scrollbar = true
|
||||
return true
|
||||
end
|
||||
return keymap.on_key_pressed(button:sub(1,1) .. "click", x, y, clicks)
|
||||
return keymap.on_key_pressed(click_prefixes[((clicks - 1) % 3) + 1] .. button:sub(1,1) .. "click", x, y, clicks)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user