Skip to content

center_x and center_y do not update when changing a Sprite's texture to one of a different size #1096

Open
@DigiDuncan

Description

@DigiDuncan

Bug Report

Actual behavior:

See title.

Expected behavior:

The center_x and center_y should reflect the new positioning due to its texture changing.

Steps to reproduce/example code:

  1. Create a Sprite with a Texture.
  2. Check it's center_x and center_y.
  3. Update its Texture to one of a different size.
  4. Observe no change to the Sprite's center_x and center_y properties.
b = sprite.bottom
sprite.set_texture(1)  # different size
sprite.bottom = b  # does nothing, even though the size is different

Screenshot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions