#include <PauseMenuState.h>
Public Member Functions | |
| PauseMenuState (sf::RenderWindow &window) | |
| ~PauseMenuState () | |
| void | update (sf::RenderWindow &window, StateManager &stateManager) override |
| Handles mouse clicks. | |
| void | render (sf::RenderWindow &window) |
| Function to draw the menu buttons. | |
Public Member Functions inherited from State | |
| virtual | ~State () |
Public Attributes | |
| bool | inSettingMenu |
| bool | inInvEnv |
| Player * | ply |
| std::vector< sf::Texture > * | textures |
| std::vector< std::string > * | filepaths |
| std::vector< sf::Sprite > * | sprites |
| PauseMenuState::PauseMenuState | ( | sf::RenderWindow & | window | ) |
Initialize font
Set up buttons (as text objects)
Set the texture to the sprite
Exit if music cannot be loaded
Track whether in options menu
Track whether in options menu
Pass reference to Menu
Pass reference to Menu
| PauseMenuState::~PauseMenuState | ( | ) |
|
virtual |
Function to draw the menu buttons.
Scale the background to fit the window size
Get the size of the window
Scale the sprite to fit the window
Implements State.
|
overridevirtual |
Handles mouse clicks.
set the inventory for the inventory state
Stop menu music
Go back to previous state
open inventory enviroment
Open settings menu
Implements State.
| std::vector<std::string>* PauseMenuState::filepaths |
| bool PauseMenuState::inInvEnv |
| bool PauseMenuState::inSettingMenu |
| Player* PauseMenuState::ply |
| std::vector<sf::Sprite>* PauseMenuState::sprites |
| std::vector<sf::Texture>* PauseMenuState::textures |