SFML community forums
Help => Graphics => Topic started by: ERROR on April 21, 2013, 01:40:20 pm
-
Hey,
I am trying to make a button and the letters should be taken from a big image. I already have the image with the whole alphabet in it. My problem is that I don't know how to make a small sprite out of the big one.
Hope somebody can help me with that problem.
-
Please refer to the documentations and tutorials and this problem can easily be solved.
See this for what you need. (http://sfml-dev.org/documentation/2.0/classsf_1_1Sprite.php#a3fefec419a4e6a90c0fd54c793d82ec2)
Notice the setTextureRect.
-
Thanks ;).
I knew it would be really easy, but I just didn't know which function I had to use.
Thanks again.