36 lines
494 B
C++
36 lines
494 B
C++
|
#ifndef STRINGINPUT_H
|
||
|
#define STRINGINPUT_H
|
||
|
|
||
|
# include <iostream>
|
||
|
# include <string>
|
||
|
# include <SDL/SDL.h>
|
||
|
# include <SDL/SDL_ttf.h>
|
||
|
|
||
|
# include "game.hpp"
|
||
|
# include "global.hpp"
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
|
||
|
class StringInput
|
||
|
{
|
||
|
public:
|
||
|
StringInput();
|
||
|
~StringInput();
|
||
|
|
||
|
string GetStr();
|
||
|
|
||
|
void handle_input( game * Game, SDL_Event * event );
|
||
|
void show_centered( game * Game );
|
||
|
|
||
|
void Clear();
|
||
|
|
||
|
private:
|
||
|
string str;
|
||
|
|
||
|
SDL_Surface *text;
|
||
|
SDL_Color textColor;
|
||
|
};
|
||
|
|
||
|
#endif // STRINGINPUT_H
|