Afegida la funció getNewPosition a la classe Screen per a respectar la posició de la finestra al canviarla de tamany

This commit is contained in:
2024-10-15 18:12:16 +02:00
parent 3fdd60c9e2
commit 089da99b5b
3 changed files with 41 additions and 2 deletions

View File

@@ -1424,7 +1424,6 @@ void Game::createItemScoreSprite(int x, int y, std::shared_ptr<Texture> texture)
smart_sprites_.emplace_back(std::make_unique<SmartSprite>(texture));
// Inicializa
smart_sprites_.back()->init();
smart_sprites_.back()->setPos({0, 0, texture->getWidth(), texture->getHeight()});
smart_sprites_.back()->setSpriteClip(smart_sprites_.back()->getPos());
smart_sprites_.back()->setPosX(x);