- Timestamp:
- May 28, 2008, 5:30:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/console/InGameConsole.h
r1214 r1446 37 37 38 38 #include "core/Tickable.h" 39 #include "core/ InputBuffer.h"39 #include "core/Shell.h" 40 40 41 41 42 42 namespace orxonox 43 43 { 44 class _OrxonoxExport InGameConsole : public InputBufferListener44 class _OrxonoxExport InGameConsole : public Tickable, public ShellListener 45 45 { 46 46 public: 47 InGameConsole(InputBuffer* ib); 48 ~InGameConsole(); 49 void listen(); 50 void execute(); 51 void hintandcomplete(); 52 void clear(); 53 void removeLast(); 54 void exit(); 55 void init(); 47 static InGameConsole& getInstance(); 48 49 void setConfigValues(); 56 50 void tick(float dt); 51 57 52 void activate(); 58 53 void deactivate(); 54 void resize(); 55 56 static void openConsole(); 57 static void closeConsole(); 59 58 60 59 private: 61 void resize(); 62 void print(Ogre::UTFString s); 63 void newline(); 64 Ogre::UTFString convert2UTF(std::string s); 60 InGameConsole(); 61 InGameConsole(const InGameConsole& other); 62 ~InGameConsole(); 65 63 66 int windowW; 67 int windowH; 68 int scroll; 69 float scrollTimer; 70 float cursor; 71 bool active; 72 InputBuffer* ib_; 73 Ogre::OverlayManager* om; 74 Ogre::Overlay* consoleOverlay; 75 Ogre::OverlayContainer* consoleOverlayContainer; 76 Ogre::PanelOverlayElement* consoleOverlayNoise; 77 Ogre::BorderPanelOverlayElement* consoleOverlayBorder; 78 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas; 64 virtual void linesChanged(); 65 virtual void onlyLastLineChanged(); 66 virtual void lineAdded(); 67 virtual void inputChanged(); 68 virtual void cursorChanged(); 69 virtual void exit(); 70 71 void init(); 72 void shiftLines(); 73 void colourLine(int colourcode, int index); 74 void print(const std::string& text, int index, bool alwaysShift = false); 75 static Ogre::UTFString convert2UTF(std::string s); 76 77 static float REL_WIDTH; 78 static float REL_HEIGHT; 79 static float BLINK; 80 81 int windowW_; 82 int windowH_; 83 int desiredTextWidth_; 84 unsigned int maxCharsPerLine_; 85 unsigned int numLinesShifted_; 86 int scroll_; 87 float scrollTimer_; 88 float cursor_; 89 unsigned int inputWindowStart_; 90 char cursorSymbol_; 91 bool active_; 92 Ogre::OverlayManager* om_; 93 Ogre::Overlay* consoleOverlay_; 94 Ogre::OverlayContainer* consoleOverlayContainer_; 95 Ogre::PanelOverlayElement* consoleOverlayNoise_; 96 Ogre::BorderPanelOverlayElement* consoleOverlayBorder_; 97 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_; 79 98 }; 80 99 }
Note: See TracChangeset
for help on using the changeset viewer.