flixel icon indicating copy to clipboard operation
flixel copied to clipboard

Functions for getting bounds with `clipRect` in FlxSprite

Open Starmapo opened this issue 1 year ago • 1 comments

Basically functions like getScreenPosition and getScreenBounds, but taking the sprite's clipRect into account.

This would be useful for example, if a UI button is in a scrollable area that modifies its clipRect, and you want to check for mouse overlap taking the clipped graphic into account. It could also be used for the isOnScreen check to prevent unnecessary drawing, though this probably counts as a breaking change.

Starmapo avatar Oct 06 '23 12:10 Starmapo

I believe we should modify getScreenBounds to honor clipRect, rather than making a new function

Geokureli avatar Oct 10 '23 18:10 Geokureli