53 lines
788 B
C++
53 lines
788 B
C++
|
#ifndef MENU_STATE_HPP_INCLUDED
|
||
|
#define MENU_STATE_HPP_INCLUDED
|
||
|
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <SDL/SDL.h>
|
||
|
|
||
|
#include "game.hpp"
|
||
|
#include "gamestate.hpp"
|
||
|
#include "menuitem.hpp"
|
||
|
#include "menu.hpp"
|
||
|
|
||
|
|
||
|
class MenuState : public GameState
|
||
|
{
|
||
|
public:
|
||
|
void Init();
|
||
|
void Clean();
|
||
|
|
||
|
void Pause();
|
||
|
void Resume();
|
||
|
|
||
|
void HandleEvents ( game * Game );
|
||
|
void Update ( game * Game );
|
||
|
void Draw ( game * Game );
|
||
|
|
||
|
// Implement Singleton Pattern
|
||
|
static MenuState * Instance()
|
||
|
{
|
||
|
return &m_MenuState;
|
||
|
}
|
||
|
|
||
|
|
||
|
static void play ( game * Game );
|
||
|
static void score ( game * Game );
|
||
|
static void quit ( game * Game );
|
||
|
|
||
|
# ifdef DEBUG
|
||
|
static void Debug_Info ( game * Game );
|
||
|
# endif
|
||
|
|
||
|
protected:
|
||
|
MenuState() {}
|
||
|
|
||
|
private:
|
||
|
static MenuState m_MenuState;
|
||
|
|
||
|
Menu * menu;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif
|