allow an alternate ViewRect for getMousePos

develop
myk002 2022-11-07 13:58:12 -08:00
parent be18f4e900
commit 28aadea6af
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 2 additions and 2 deletions

@ -473,8 +473,8 @@ function View:getWindowSize()
return rect.width, rect.height
end
function View:getMousePos()
local rect = self.frame_body
function View:getMousePos(view_rect)
local rect = view_rect or self.frame_body
local x,y = dscreen.getMousePos()
if rect and rect:inClipGlobalXY(x,y) then
return rect:localXY(x,y)