Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MENU_H
- #define MENU_H
- #include "SDL.h"
- #include "SDL_TTF.h"
- #include "sdl_graphics.h"
- #include "timer.h"
- #include "constants.h"
- #include <string>
- #include <sstream>
- class Menu
- {
- private:
- SDL_Rect MenuArea, SpeedMenuArea, StartButtonArea, StopButtonArea, SpeedArea, GenerationArea, NumberArea;
- SDL_Rect SpeedSlowArea, SpeedNormalArea, SpeedFastArea;
- SDL_Rect StartSelectionArea, StopSelectionArea, SlowSelectionArea, NormalSelectionArea, FastSelectionArea;
- SDL_Surface *texttorender;
- bool isButtonPressed[NUMBER_OF_BUTTONS];
- bool DisplaySpeedMenu;
- unsigned int NumberOfGenerationsInt;
- std::stringstream HoldTextForNumberOfGenerations;
- TTF_Font *font;
- public:
- Menu();
- void drawMenu(SDL_Graphics* aGraphicsObject, Timer Time);
- void drawText(const char* TextToDraw, SDL_Graphics* aGraphicsObject, SDL_Rect &area);
- SDL_Rect getButtonArea(int WhichOne);
- void setIsButtonPressed(int WhichOne, bool value);
- bool getIsButtonPressed(int WhichOne);
- void enactMenuChoice(Timer &Time);
- void setDisplaySpeedMenu(bool value);
- bool getDisplaySpeedMenu();
- void AddOneToGenerationCount();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement