Ryan a2b7565639 Add 'multi/' from commit '285fa7e933d1986bcbd354294c05cee40ef43cea'
git-subtree-dir: multi
git-subtree-mainline: 14f186d8e1f36b38f6816dfa4d004dd023b882ce
git-subtree-split: 285fa7e933d1986bcbd354294c05cee40ef43cea
2017-07-28 11:08:11 -04:00

15 lines
386 B
Plaintext

function gui:Clickable()
local x,y,w,h=love.graphics.getScissor()
local mx=love.mouse.getX()
local my=love.mouse.getY()
if _GuiPro.HasStencel then
local obj=_GuiPro.StencelHolder
if self:isDescendant(obj) then
return math.sqrt((mx-obj.x)^2+(my-obj.y)^2)<=(obj.offset.size.x or 0)
end
end
if not(x) then
return true
end
return not(mx>x+w or mx<x or my>y+h or my<y)
end