-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathExample03.cpp
More file actions
48 lines (48 loc) · 966 Bytes
/
Example03.cpp
File metadata and controls
48 lines (48 loc) · 966 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//#include<iostream>
//#include"SFML\Graphics.hpp"
//#include"SFML\Window.hpp"
//#include"SFML\System.hpp"
//
//using namespace sf;
//
//int main()
//{
// RenderWindow window(VideoMode(640, 400), "Example 03", Style::Default);
// window.setFramerateLimit(60);
//
// CircleShape circle(50.f);
// circle.setPosition(Vector2f(0.f, 0.f));
//
// RectangleShape rect(Vector2f(50.f, 100.f));
// rect.setPosition(Vector2f(400.f, 200.f));
//
// circle.setFillColor(Color(255,100,200,200));
// rect.setFillColor(Color(255, 255, 200, 100));
//
// while (window.isOpen())
// {
// Event event;
// while (window.pollEvent(event))
// {
// if (event.type == Event::Closed)
// window.close();
// }
//
// //Update
// circle.move(0.5f, 0.1f);
// circle.rotate(2.f);
// rect.move(-0.5f, -0.1f);
// rect.rotate(5.f);
//
// //Draw
// window.clear();
//
// //Draw everything
// window.draw(circle);
// window.draw(rect);
//
// window.display();
// }
//
// return 0;
//}