Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Can you declare two shapes in one class and draw them both such as.
Print
Pages: [
1
]
Author
Topic: Can you declare two shapes in one class and draw them both such as. (Read 1576 times)
0 Members and 2 Guests are viewing this topic.
Darkpony
Newbie
Posts: 7
Can you declare two shapes in one class and draw them both such as.
«
on:
April 23, 2017, 02:52:48 am »
Can i create two shapes with sfml and draw them together all in the same class?
void TowerA::draw(sf::RenderWindow & window)
{
window.draw(sprite)
window.draw(circle)
window.draw(circle2)
}
Logged
JayhawkZombie
Jr. Member
Posts: 76
Re: Can you declare two shapes in one class and draw them both such as.
«
Reply #1 on:
April 23, 2017, 05:10:55 am »
Yes. If they're on top of each other, the last one that gets drawn wins, so just draw them in the right order.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Can you declare two shapes in one class and draw them both such as.
anything