Caseus Tower
 All Classes Namespaces Files Functions Variables
menu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include "state.h"
5 #include "spriteHandler.h"
6 #include "credits.h"
7 #include "game.h"
8 #include "entity.h"
9 #include "animation.h"
10 #include "audio.h"
11 
16 class Menu : public State
17 {
18 private:
22  std::vector<Entity *> buttons;
24  bool pressed;
27  /*The current index of the button Sprite objects*/
29  /*the button that was pressed (0 = play, 1 = credits, 2 = exit)*/
30  int selected;
31 public:
39  Menu(StateManager *, SpriteHandler*, int, int);
40 
44  ~Menu();
45 
52  void update(float, float, float);
53 
57  void drawSprites();
58 
62  void drawSpritesWithAlpha();
63 };
64 
Creates an Animation object Creates an Animation object to handle the timing of when an Animation sho...
Definition: animation.h:8
int creditSprite
Definition: menu.h:28
Creates an State object Creates an State object with virtual functions and the SpriteHandler * and wi...
Definition: state.h:12
Creates an Menu object Creates an Menu object which inherits State.
Definition: menu.h:16
Menu(StateManager *, SpriteHandler *, int, int)
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAMER - This is a m...
Definition: stateManager.h:11
std::vector< Entity * > buttons
Definition: menu.h:22
void drawSprites()
void drawSpritesWithAlpha()
int selected
Definition: menu.h:30
bool pressed
Definition: menu.h:24
Animation * buttonPress
Definition: menu.h:26
Creates an SpriteHandler object Creates an SpriteHandler object to deal with all of the applications ...
Definition: spriteHandler.h:12
void update(float, float, float)
int playSprite
Definition: menu.h:28
int exitSprite
Definition: menu.h:28
Audio * music
Definition: menu.h:20
Creates a Audio object to handle the SDL_Mixer.
Definition: audio.h:10