Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FlxObject: fix overlapsPoint() if overlap is at x or y = 0 (#1818)
* The top and left edges of checked objects were not registering as overlapping, when they should be. (Consider the example of a single pixel at 0,0: the former could would never register an overlap with the mouse, always looking for your position to be > 0 and < 1. Even though it's a float, it still gets updated to integer values when you move the mouse.) May seem trivial, but when you have a button at the edge of a full-screen game, it becomes important. * Fix test by moving button out from under the cursor. * Add unit test for #1818. Also make the existing unit test remove from the state afterwards so we don't double-add, while leaving the existing tests independent of having been add()ed.
- Loading branch information