Advertisement
Suby

menu.h

Jun 1st, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.14 KB | None | 0 0
  1. #ifndef MENU_H
  2. #define MENU_H
  3.  
  4. #include "SDL.h"
  5. #include "SDL_TTF.h"
  6. #include "sdl_graphics.h"
  7. #include "timer.h"
  8. #include "constants.h"
  9. #include <string>
  10. #include <sstream>
  11.  
  12. class Menu
  13. {
  14. private:
  15.     SDL_Rect MenuArea, SpeedMenuArea, StartButtonArea, StopButtonArea, SpeedArea, GenerationArea, NumberArea;
  16.     SDL_Rect SpeedSlowArea, SpeedNormalArea, SpeedFastArea;
  17.     SDL_Rect StartSelectionArea, StopSelectionArea, SlowSelectionArea, NormalSelectionArea, FastSelectionArea;
  18.    
  19.     SDL_Surface *texttorender;
  20.     bool isButtonPressed[NUMBER_OF_BUTTONS];
  21.     bool DisplaySpeedMenu;
  22.  
  23.     unsigned int NumberOfGenerationsInt;
  24.     std::stringstream HoldTextForNumberOfGenerations;
  25.  
  26.     TTF_Font *font;
  27.  
  28. public:
  29.     Menu();
  30.  
  31.     void drawMenu(SDL_Graphics* aGraphicsObject, Timer Time);
  32.     void drawText(const char* TextToDraw, SDL_Graphics* aGraphicsObject, SDL_Rect &area);
  33.    
  34.     SDL_Rect getButtonArea(int WhichOne);
  35.    
  36.     void setIsButtonPressed(int WhichOne, bool value);
  37.     bool getIsButtonPressed(int WhichOne);
  38.  
  39.     void enactMenuChoice(Timer &Time);
  40.     void setDisplaySpeedMenu(bool value);
  41.     bool getDisplaySpeedMenu();
  42.     void AddOneToGenerationCount();
  43. };
  44.  
  45. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement