blob: 45fca6c98899890336b8ec6f433da003eb0dd148 (
plain)
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
|
/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include <SFML/Graphics.hpp>
using namespace sf;
int main()
{
// Create the main window
RenderWindow window(VideoMode(800, 600), "SFML window");
Music music;
Texture texture;
Font font;
Text text;
TcpSocket socket;
CircleShape shape(200);
shape.setPosition(200, 100);
shape.setFillColor(Color::Red);
while (window.isOpen())
{
// Process events
Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == Event::Closed)
window.close();
}
// Clear screen
window.clear();
// Draw the sprite
window.draw(shape);
// Update the window
window.display();
}
return 0;
}
|