This commit is contained in:
Mylloon 2023-12-28 00:27:13 +01:00
parent 33254abc33
commit 51b3e74607
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -11,7 +11,7 @@ Ecran::~Ecran() {}
void Ecran::afficher(
const std::function<void()> dessin,
const std::function<void(const int, const int)> onclick) const {
const std::function<void(const int, const int)> onClick) const {
// Flag qui track si le clic gauche est pressé
bool mouseButtonPressed = false;
@ -32,7 +32,7 @@ void Ecran::afficher(
if (!mouseButtonPressed) {
if (event.type == sf::Event::MouseButtonPressed &&
event.mouseButton.button == sf::Mouse::Left) {
onclick(event.mouseButton.x, event.mouseButton.y);
onClick(event.mouseButton.x, event.mouseButton.y);
mouseButtonPressed = true;
}
}