Changeset 1502 for code/trunk/src/orxonox/console/InGameConsole.h
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/console/InGameConsole.h
r1214 r1502 23 23 * Felix Schulthess 24 24 * Co-authors: 25 * ...25 * Fabian 'x3n' Landau 26 26 * 27 27 */ … … 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 TickableReal, 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 setCursorPosition(int pos); 75 void print(const std::string& text, int index, bool alwaysShift = false); 76 static Ogre::UTFString convert2UTF(std::string s); 77 78 static float REL_WIDTH; 79 static float REL_HEIGHT; 80 static float BLINK; 81 82 int windowW_; 83 int windowH_; 84 int desiredTextWidth_; 85 unsigned int maxCharsPerLine_; 86 unsigned int numLinesShifted_; 87 int scroll_; 88 float scrollTimer_; 89 float cursor_; 90 unsigned int inputWindowStart_; 91 char cursorSymbol_; 92 bool active_; 93 bool bShowCursor_; 94 std::string displayedText_; 95 Ogre::OverlayManager* om_; 96 Ogre::Overlay* consoleOverlay_; 97 Ogre::OverlayContainer* consoleOverlayContainer_; 98 Ogre::PanelOverlayElement* consoleOverlayNoise_; 99 Ogre::PanelOverlayElement* consoleOverlayCursor_; 100 Ogre::BorderPanelOverlayElement* consoleOverlayBorder_; 101 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_; 79 102 }; 80 103 }
Note: See TracChangeset
for help on using the changeset viewer.