Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Reset function for sf:Sprite  (Read 12078 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Reset function for sf:Sprite
« Reply #15 on: February 17, 2009, 05:23:57 pm »
Ok sorry... my last post was a little bit rude ;)

Let's do it simpler. To me, the reason why this feature is requested doesn't make sense:
Quote
This could be useful when a Sprite has got several Images with different sizes. Every time you switch between them, you have to rescale the sprite, set a new center, etc

You're going to set new values according to the new image, not reset everything, right? So, what do you want this function for?

Apparently everyone agrees with this request, so maybe someone can give me a better reason, or a better way to convince me with this one :)
Laurent Gomila - SFML developer

Daazku

  • Hero Member
  • *****
  • Posts: 896
    • View Profile
Reset function for sf:Sprite
« Reply #16 on: February 17, 2009, 09:01:35 pm »
I don't think this function is useful... you really want to reuse the sprite? Do

mySprite = Sprite();
Pensez à mettre le tag [Résolu] une fois la réponse à votre question trouvée.
Remember to add the tag [Solved] when you got an answer to your question.

csiz

  • Newbie
  • *
  • Posts: 30
    • Yahoo Instant Messenger - calinutzu92
    • View Profile
    • Email
Reset function for sf:Sprite
« Reply #17 on: February 17, 2009, 09:36:28 pm »
Hmm me thinks the most important thing in Resize() is that after it the subrect of the Sprite to be set from the Image, like setting an image to a sprite for the first time.

But than it would be more useful just to change SetImage(Image) so that the subrect is reset.
My new webpage calinmocanu

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Reset function for sf:Sprite
« Reply #18 on: February 17, 2009, 11:04:00 pm »
Quote
But than it would be more useful just to change SetImage(Image) so that the subrect is reset.

It has already been discussed, and actually it's not a good option :P
Laurent Gomila - SFML developer

 

anything