Skip to content

Detect changes to clipRect without needing to reset the field in order to take effect #3162

Closed
@DetectiveBaldi

Description

@DetectiveBaldi

currently, using FlxRect for fields such as FlxSprite.clipRect requires reassigning in order for changes to take effect. i've seen multiple people question this, and i've wondered if there's a simpler way around it.

Some ideas:

  • Create a class similar to FlxCallbackPoint (potentially FlxCallbackRect) that acts similarly to the callback point class.
  • Implement this functionality in FlxRect itself, possibly a callback function that gets called when setting x, y, width, height.

If we went with the latter, we could potentially remove FlxCallbackPoint and add similar functionality into the standard FlxPoint class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions