Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
SM_Scores.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <iostream>
5 #include <fstream>
6 #include <vector>
7 #include "../S_State.h"
8 #include "../S_StateManager.h"
9 #include "../../Core/C_Texture.h"
10 #include "../../Core/C_Audio.h"
11 #include "../../Core/C_Music.h"
12 #include "../../Core/C_Text.h"
13 #include "../../UI/UI_Button.h"
14 #include "SM_MainMenu.h"
15 
20 class SM_Scores : public S_State
21 {
22 public:
31 
35  ~SM_Scores();
36 
41  bool input();
42 
47  void update(float dt);
48 
52  void draw();
53 
54 private:
66  std::vector<std::string> scores;
67  //The std::vector of Scores Text
68  std::vector<C_Text*> scoresText;
75  //The Y position of the Button
76  float buttonYPos;
77 
81  void loadScores();
82 };
Creates a Button object that inherits Entity.
Definition: UI_Button.h:11
~SM_Scores()
Destructs the State object.
Definition: SM_Scores.cpp:41
C_Music * backgroundMusic
The background music.
Definition: SM_Scores.h:56
void loadScores()
A function to load in the scores.
Definition: SM_Scores.cpp:127
float * universalSpeed
A pointer for the universal speed of the menu.
Definition: SM_Scores.h:64
UI_Button * exitButton
The Exit Button.
Definition: SM_Scores.h:70
std::vector< C_Text * > scoresText
Definition: SM_Scores.h:68
C_Vec2 dimensions
The screen dimensions.
Definition: S_State.h:53
std::vector< std::string > scores
A std::vector of the loaded scores.
Definition: SM_Scores.h:66
Contains State functions and data to be inherited by all other states.
Definition: S_State.h:14
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
C_Texture * buttonBackground
The Button Background Image.
Definition: SM_Scores.h:60
S_StateManager * stateManager
A pointer to the state manager.
Definition: S_State.h:49
SM_Scores(S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic)
Constructs the State object.
Definition: SM_Scores.cpp:3
bool input()
Handles the State input.
Definition: SM_Scores.cpp:56
C_Vec2 coinDim
The dimensions of the coin image.
Definition: SM_Scores.h:74
Handles music using SDL_Mixer.
Definition: C_Music.h:12
void draw()
A function to draw the State to the screen.
Definition: SM_Scores.cpp:101
A State that contains and runs the Scores Menu.
Definition: SM_Scores.h:20
Handles the functions for all State objects.
Definition: S_StateManager.h:11
float buttonYPos
Definition: SM_Scores.h:76
C_Texture * background
The Background Image.
Definition: SM_Scores.h:58
C_Texture * coin
The Coin Image.
Definition: SM_Scores.h:72
void update(float dt)
A function to update the State.
Definition: SM_Scores.cpp:93
SDL_Renderer * renderer
A pointer to the renderer.
Definition: S_State.h:51
C_Texture * scoresBackground
The Scores Background Image.
Definition: SM_Scores.h:62
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13