| 1 |
#ifndef HEADER_KEYCONSOLE_H |
| 2 |
#define HEADER_KEYCONSOLE_H |
| 3 |
|
| 4 |
class Font; |
| 5 |
|
| 6 |
#include "GameState.h" |
| 7 |
#include "Drawable.h" |
| 8 |
#include "Color.h" |
| 9 |
|
| 10 |
#include <string> |
| 11 |
#include "SDL.h" |
| 12 |
|
| 13 |
/** |
| 14 |
* Debug console. |
| 15 |
*/ |
| 16 |
class KeyConsole : public GameState, public Drawable { |
| 17 |
private: |
| 18 |
Font *m_font; |
| 19 |
Color m_color; |
| 20 |
std::string m_input; |
| 21 |
protected: |
| 22 |
virtual void own_initState() {}; |
| 23 |
virtual void own_updateState() {}; |
| 24 |
virtual void own_pauseState() {}; |
| 25 |
virtual void own_resumeState() {}; |
| 26 |
virtual void own_cleanState() {}; |
| 27 |
public: |
| 28 |
KeyConsole(); |
| 29 |
virtual ~KeyConsole(); |
| 30 |
virtual const char *getName() const { return "state_console"; }; |
| 31 |
virtual bool allowBg() const { return true; } |
| 32 |
|
| 33 |
void setInput(const std::string &input) { m_input = input; } |
| 34 |
std::string getInput() const { return m_input; } |
| 35 |
|
| 36 |
bool sendCommand(); |
| 37 |
virtual void drawOn(SDL_Surface *screen); |
| 38 |
}; |
| 39 |
|
| 40 |
#endif |