Skip to content

Commit

Permalink
Pause button works with Face button
Browse files Browse the repository at this point in the history
  • Loading branch information
EAOZONE committed Apr 23, 2024
1 parent 77db1bf commit 024a19b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions GameWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ class GameWindow{
if (sf::Mouse().isButtonPressed(Mouse::Left) && !leftButtonPressed){
leftButtonPressed = true;
if(faceButton.buttonClicked(sf::Mouse().getPosition(window))){
paused = false;
pausePlayButton.setPause(paused);
pausePlayButton.updateButtonTexture();
seconds = 0;
minutes = 0;
clock.restart();
Expand Down
3 changes: 3 additions & 0 deletions PausePlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ class PausePlay : public Button{
bool getButtonPressed(){
return buttonPressed;
}
void setPause(bool pause){
this->pause = pause;
}
};

0 comments on commit 024a19b

Please sign in to comment.