Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
menuState.h
1 #pragma once
2 #ifndef MENUSTATE_H
3 #define MENUSTATE_H
4 
5 #include "state.h"
6 #include "stateManager.h"
7 #include "texture.h"
8 #include "audio.h"
9 
14 class MenuState : public State
15 {
16 private:
17  /*audio*/
18  Audio * music;
19  /*background*/
20  Texture * background;
21  Texture * menuKeys;
22  /*mouseClickPosition*/
23  float x;
24  float y;
25  /*int variables for if menu keys are highlighted, can be 0 or 1*/
26  int playKey;
27  int credKey;
28  int exitKey;
29  /*which key is pressed, 0 for none*/
30  int pressed;
31 public:
38  MenuState(StateManager *, SDL_Renderer *);
39 
44  ~MenuState();
45 
51  bool HandleSDLEvents();
52 
58  void Update(float deltaTime);
59 
64  void Draw();
65 };
66 #endif
Creates a State object. Creates a State object to be inherited. Made using information from http://bl...
Definition: state.h:17
~MenuState()
Definition: menuState.cpp:35
Creates a State manager object. Creates a State manager object to be inherited. Made using informatio...
Definition: stateManager.h:13
Creates a MenuState object. Creates a MenuState object that inherits State.
Definition: menuState.h:14
void Draw()
Definition: menuState.cpp:145
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
void Update(float deltaTime)
Definition: menuState.cpp:136
bool HandleSDLEvents()
Definition: menuState.cpp:49
MenuState(StateManager *, SDL_Renderer *)
Definition: menuState.cpp:8
Creates a Audio object to handle the SDL_Mixer. Done using help from http://www.lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.php.
Definition: audio.h:13