-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (26 loc) · 845 Bytes
/
main.cpp
File metadata and controls
34 lines (26 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode({ 800, 600 }), "Colored Circles");
window.clear();
sf::CircleShape shape1(40);
shape1.setPosition({ 200, 120 });
shape1.setFillColor(sf::Color(0xFF, 0x0, 0x0));
window.draw(shape1);
sf::CircleShape shape2(48);
shape2.setPosition({ 260, 120 });
shape2.setFillColor(sf::Color(0x0, 0xFF, 0x0));
window.draw(shape2);
sf::CircleShape shape3(60);
shape3.setPosition({ 320, 160 });
shape3.setFillColor(sf::Color(0x0, 0x0, 0xFF));
window.draw(shape3);
sf::CircleShape shape4(75);
shape4.setPosition({ 330, 220 });
shape4.setFillColor(sf::Color(0xFF, 0xFF, 0x0));
window.draw(shape4);
window.display();
sf::sleep(sf::seconds(5));
}