HaxeFlixel / HaxeFlixel/flixel
Functions for getting bounds with `clipRect` in FlxSprite
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing FlxSprite's existing getScreenPosition and getScreenBounds behavior with the sprite's clipRect. Determine how clipped bounds should be exposed and whether changing isOnScreen would be breaking. Done means providing bounds functions that account for clipRect and validating the mouse-over and drawing scenarios described in the issue.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100