Flying Cacos! Canvis en viewport:inside i adaptat cacau a la nova capçalera
This commit is contained in:
@@ -23,9 +23,9 @@ function viewport:screen_coords ( x, y )
|
||||
return scr_x, scr_y
|
||||
end
|
||||
|
||||
function viewport:inside( x, y )
|
||||
function viewport:inside( x, y, w, h )
|
||||
local result = false
|
||||
if x>=self.x and x<=self.x+self.width and y>=self.y and y<=self.y+self.height then result = true end
|
||||
if self.x<=x+w and self.x+self.width>=x and self.y<=y+h and self.y+self.height>=y then result = true end
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user