HaxeFlixel / HaxeFlixel/flixel

Functions for getting bounds with `clipRect` in FlxSprite

Open
#2,933 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.