home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / ConsoleFrontEnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-12-06  |  1.2 KB  |  67 lines

  1. #ifndef __ConsoleFrontEnd_h__
  2. #define __ConsoleFrontEnd_h__
  3.  
  4. //#include "shared.h"
  5. #include "Console.h"
  6. #include "Texture.h"
  7. #include "Shader.h"
  8. #include "texfont.h"
  9. //#include "vectormath.h"
  10. #include "SDL.h"
  11. #include "CCmd.h"
  12. #include "CVar.h"
  13. #include "CAlias.h"
  14.  
  15. class ConsoleFrontEnd{
  16. public:
  17.     Console* console;
  18.     bool isActive;
  19.     char* promptStr;
  20.  
  21.     char* inputStr;
  22.     int inputStrIndex;
  23.  
  24.     char* historyLines[CON_MAX_HISTORY_LINES];
  25.     int inputHistoryIndex;
  26.  
  27.     int scrollIndex;
  28.     int lineSpacing;
  29.     int height;
  30.  
  31.     Texture* backgroundTex;
  32.     Shader* backgroundShader;
  33.     texFont_t* font;
  34.  
  35.     float fontColor[4];
  36.     float backgroundColor[4];
  37.  
  38.     
  39.     ConsoleFrontEnd(Console* console);
  40.     ~ConsoleFrontEnd();
  41.  
  42.     void activate();
  43.     void deactivate();
  44.     
  45.     void receiveKey(SDL_keysym* keysym);
  46. //    void recieveSpecialKey(SDL_keysym* keysym);
  47. //    void recieveNormalKey(SDL_keysym* keysym);
  48.     void sendToConsole(char* str);
  49.     void clearInputString();
  50.  
  51.     void draw();
  52.  
  53.     void drawPrompt();
  54.     void drawLines();
  55.     void drawBackground();
  56.  
  57.     void clearHistory();
  58.     void appendHistoryLine(const char* line);
  59.  
  60. };
  61.  
  62.  
  63. extern ConsoleFrontEnd* consoleFrontEnd;
  64.  
  65.  
  66. #endif    /* __ConsoleFrontEnd_h__*/
  67.