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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nerolat

Pages: [1]
1
Graphics / Re: GetPosition for shapes and sprites
« on: December 01, 2012, 06:03:10 pm »
Stupid of me. I thought first args of constructor are pos.
Well RTFM! it's so nice and easy understandable. ;)

Also I advise you to use SFML 2, because SFML 1.6 hasn't been touched over 2 years, has many bugs and lacks a lot of new and shiny features. :)

Thanks! You are my savior!

By the way, another question -
what shape should I use for lines? I thought there is a shape in SFML 2.0 especially made for lines.

2
Graphics / Re: GetPosition for shapes and sprites
« on: November 27, 2012, 06:57:38 pm »
Thanks for reply, Laurent, however even if I set it to
Quote
sf::Shape Rect = sf::Shape::Rectangle(100, 100, 20, 20, sf::Color::Red);
It still returns 0. Using SFML 1.6

EDIT:

Stupid of me. I thought first args of constructor are pos.

3
Graphics / GetPosition for shapes and sprites
« on: November 27, 2012, 06:55:28 pm »
Hello, I keep getting 0 from GetPosition().x and GetPosition().y everytime I use it. No matter if it is a sprite, a shpae or anything.
       
Quote
x = Rect.GetPosition().x;
        std::cout << x << std::endl; // Always prints 0;
Here is the line where I create that rectangle:
Quote
sf::Shape Rect = sf::Shape::Rectangle(0, 0, 20, 20, sf::Color::Red);

Pages: [1]
anything