make slider easier to acquire on the extremes

This commit is contained in:
Kartik K. Agaram 2023-11-21 02:22:01 -08:00
parent 76bfcba47e
commit c16b17f4d7
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
on_slider = function(slider, x,y) on_slider = function(slider, x,y)
if x < slider.x0 or x > slider.x1 then return end if x < slider.x0-slider.w/2 or x > slider.x1+slider.w/2 then return end
if y < slider.y0-slider.h/2 or y > slider.y0+slider.h/2 then return end if y < slider.y0-slider.h/2 or y > slider.y0+slider.h/2 then return end
return true return true
end end