-
Notifications
You must be signed in to change notification settings - Fork 0
/
froggyappwrapper.hpp
45 lines (33 loc) · 1.04 KB
/
froggyappwrapper.hpp
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
/*
* FroggyAppWrapper.h
*
* Description: This file contains the declaration of the FroggyAppWrapper class.
* It serves as a wrapper for the Froggy application, encapsulating the main application logic.
* The class manages the menu, game session, and settings related to sound and volume.
*
* Author: Brandon Xu
* Date: 4/28/23
*/
#pragma once
#include "gamesession.hpp"
class FroggyAppWrapper {
public:
FroggyAppWrapper(); // Default constructor
void startApplication(); // Contains overarching application logic
void createMenuWindow();
bool handleMenu(); // Display menu and handle menu events
void newGame(); // Start a new game
void displayInstructions();
void handleOptionsMenu();
void updateVolume();
private:
sf::RenderWindow _window; // Menu window
int _highScore; // Session highscore
sf::Font _font; // Main font
// Settings
bool _soundEnabled;
int _volume;
int _storedVol; // Remember previous volume setting when user chooses to toggle mute
sf::Music menuMusic;
sf::Music gameMusic;
};