Tetris/menuitem.hpp

35 lines
512 B
C++
Raw Normal View History

2014-11-07 20:47:50 +01:00
#ifndef MENUITEM_HPP_INCLUDED
#define MENUITEM_HPP_INCLUDED
#include <iostream>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include "global.hpp"
#include "game.hpp"
using namespace std;
class MenuItem
{
public:
MenuItem ( const char * nazov, void ( * action ) ( game * ) );
void Execute ( game * Game );
void draw ( game * Game, int x, int y, bool active = false );
private:
void ( * action ) ( game * );
const char * nazov;
SDL_Surface * message;
SDL_Color text_color;
};
#endif