home *** CD-ROM | disk | FTP | other *** search
- #ifndef __ConsoleFrontEnd_h__
- #define __ConsoleFrontEnd_h__
-
- //#include "shared.h"
- #include "Console.h"
- #include "Texture.h"
- #include "Shader.h"
- #include "texfont.h"
- //#include "vectormath.h"
- #include "SDL.h"
- #include "CCmd.h"
- #include "CVar.h"
- #include "CAlias.h"
-
- class ConsoleFrontEnd{
- public:
- Console* console;
- bool isActive;
- char* promptStr;
-
- char* inputStr;
- int inputStrIndex;
-
- char* historyLines[CON_MAX_HISTORY_LINES];
- int inputHistoryIndex;
-
- int scrollIndex;
- int lineSpacing;
- int height;
-
- Texture* backgroundTex;
- Shader* backgroundShader;
- texFont_t* font;
-
- float fontColor[4];
- float backgroundColor[4];
-
-
- ConsoleFrontEnd(Console* console);
- ~ConsoleFrontEnd();
-
- void activate();
- void deactivate();
-
- void receiveKey(SDL_keysym* keysym);
- // void recieveSpecialKey(SDL_keysym* keysym);
- // void recieveNormalKey(SDL_keysym* keysym);
- void sendToConsole(char* str);
- void clearInputString();
-
- void draw();
-
- void drawPrompt();
- void drawLines();
- void drawBackground();
-
- void clearHistory();
- void appendHistoryLine(const char* line);
-
- };
-
-
- extern ConsoleFrontEnd* consoleFrontEnd;
-
-
- #endif /* __ConsoleFrontEnd_h__*/
-