refactor: move position property to UIDrawable base class (UISprite)

- Update UISprite to use base class position instead of sprite position
- Synchronize sprite position with base class position for rendering
- Implement onPositionChanged() for position synchronization
- Update all UISprite methods to use base position consistently
- Add comprehensive test coverage for UISprite position handling

This is part 3 of moving position to the base class. UIGrid is the final
class that needs to be updated.
This commit is contained in:
John McCardle 2025-07-07 17:54:47 -04:00
commit e1c6c53157
3 changed files with 28 additions and 15 deletions

View file

@ -46,6 +46,7 @@ public:
sf::FloatRect get_bounds() const override;
void move(float dx, float dy) override;
void resize(float w, float h) override;
void onPositionChanged() override;
// Property system for animations
bool setProperty(const std::string& name, float value) override;