-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphique.cpp
43 lines (34 loc) · 1006 Bytes
/
Graphique.cpp
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
#include "Classes.h"
/*
void image(string image_path){
sf::Texture imageFond_texture;
if(imageFond_texture.loadFromFile(image_path, sf::IntRect(0, 0, WIDTH, HEIGHT))){
cout << "ERRRRRRRRRROOOOORRR" << endl;
}
sf::Sprite imageFond;
imageFond.setTexture(imageFond_texture);
}
void drawSprite(sf::Sprite image){
while (window.isOpen())
{
sf::Vector2i globalPosition = sf::Mouse::getPosition(window);
sf::Event event;
cout << globalPosition.x << " " << globalPosition.y << std::endl;
//sf::CircleShape airplane = afficherAvion();
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(image);
window.display();
}
}
sf::CircleShape afficherAvion(float x, float y){
sf::CircleShape avion(20.f);
avion.setFillColor(sf::Color::Blue);
avion.setPosition(x, y);
return avion;
}
*/