make slider easier to acquire on the extremes
This commit is contained in:
parent
76bfcba47e
commit
c16b17f4d7
|
@ -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
|
Loading…
Reference in New Issue