Flying Cacos! Canvis en viewport:inside i adaptat cacau a la nova capçalera

This commit is contained in:
2026-03-24 20:58:19 +01:00
parent e28e053cb4
commit ef18447712
4 changed files with 110 additions and 8 deletions

View File

@@ -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