Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
SM_MainMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <iostream>
5 #include "../S_State.h"
6 #include "../S_StateManager.h"
7 #include "../../Core/C_Texture.h"
8 #include "../../Core/C_Audio.h"
9 #include "../../Core/C_Music.h"
10 #include "../../Core/C_Text.h"
11 #include "../../UI/UI_Button.h"
12 #include "../Menus/SM_Credits.h"
13 #include "../Menus/SM_Scores.h"
14 #include "../S_Game.h"
15 
20 class SM_MainMenu : public S_State
21 {
22 public:
31 
35  ~SM_MainMenu();
36 
41  bool input();
42 
47  void update(float dt);
48 
52  void draw();
53 
54 private:
66  float buttonYpos[4];
81 };
void update(float dt)
A function to update the State.
Definition: SM_MainMenu.cpp:153
Creates a Button object that inherits Entity.
Definition: UI_Button.h:11
UI_Button * scoresButton
The Scores Button.
Definition: SM_MainMenu.h:70
A State that contains and runs the Main Menu.
Definition: SM_MainMenu.h:20
void draw()
A function to draw the State to the screen.
Definition: SM_MainMenu.cpp:164
UI_Button * playButton
The Play Button;.
Definition: SM_MainMenu.h:72
C_Vec2 dimensions
The screen dimensions.
Definition: S_State.h:53
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
float * universalSpeed
A pointer for the universal speed of the menu.
Definition: SM_MainMenu.h:80
bool input()
Handles the State input.
Definition: SM_MainMenu.cpp:97
SM_MainMenu(S_StateManager *stateManager, SDL_Renderer *renderer, C_Vec2 dimensions, C_Music *backgroundMusic)
Constructs the State object.
Definition: SM_MainMenu.cpp:3
S_StateManager * stateManager
A pointer to the state manager.
Definition: S_State.h:49
~SM_MainMenu()
Destructs the State object.
Definition: SM_MainMenu.cpp:83
C_Vec2 logoDim
The dimensions of the logo image.
Definition: SM_MainMenu.h:78
UI_Button * exitButton
The Exit Button.
Definition: SM_MainMenu.h:74
C_Texture * coin
The Coin Image.
Definition: SM_MainMenu.h:62
Handles music using SDL_Mixer.
Definition: C_Music.h:12
Handles the functions for all State objects.
Definition: S_StateManager.h:11
C_Music * backgroundMusic
The background music.
Definition: SM_MainMenu.h:56
C_Vec2 coinDim
The dimensions of the coin image.
Definition: SM_MainMenu.h:76
C_Texture * buttonBackground
The Button Background Image.
Definition: SM_MainMenu.h:60
UI_Button * creditsButton
The Credits button.
Definition: SM_MainMenu.h:68
SDL_Renderer * renderer
A pointer to the renderer.
Definition: S_State.h:51
C_Texture * logo
The Logo Image.
Definition: SM_MainMenu.h:64
float buttonYpos[4]
The buttons y positions.
Definition: SM_MainMenu.h:66
C_Texture * background
The Background Image.
Definition: SM_MainMenu.h:58
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13