SFML community forums
Help => General => Topic started by: NGM88 on June 06, 2017, 09:56:04 pm
-
How would these be converted to 2.x?
win.draw(sf::Shape::Rectangle(le.Blocks[0].fRect, sf::Color(255, 0, 0)));
rt.draw(sf::Shape(sf::Shape::Line(l.position, end, 1, l.color)));
le.Blocks is basically a vector of FloatRects.
l.position and end are Vector2fs
-
Looks like you need sf::RectangleShape (https://www.sfml-dev.org/documentation/2.4.2/classsf_1_1RectangleShape.php).
-
Well, I failed :/
if anyone wants to take a look:
https://stackoverflow.com/questions/44620031/dynamic-lighting-program-with-sfml-1-6-to-2-x-conversion