Changeset 1755 for code/trunk/src/orxonox/overlays/console/InGameConsole.h
- Timestamp:
- Sep 10, 2008, 1:37:36 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/gui (added) merged: 1636,1638,1640-1647,1649-1654,1656,1659-1665,1670,1672-1674,1686,1688-1692,1694-1697,1704 /code/branches/input (added) merged: 1629-1630
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r1747 r1755 37 37 38 38 #include "core/Shell.h" 39 #include " objects/Tickable.h"39 #include "core/OrxonoxClass.h" 40 40 #include "tools/WindowEventListener.h" 41 41 … … 43 43 namespace orxonox 44 44 { 45 class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener, public WindowEventListener45 class _OrxonoxExport InGameConsole : virtual public OrxonoxClass, public ShellListener, public WindowEventListener 46 46 { 47 public: // functions 48 void initialise(); 49 void destroy(); 50 void setConfigValues(); 47 public: // functions 48 InGameConsole(); 49 ~InGameConsole(); 51 50 52 virtual void tick(float dt); 51 void initialise(); 52 void destroy(); 53 void setConfigValues(); 53 54 54 static InGameConsole& getInstance();55 virtual void tick(float dt); 55 56 56 static void openConsole();57 static void closeConsole();57 static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 58 static InGameConsole* getInstancePtr() { return singletonRef_s; } 58 59 59 private: // functions 60 InGameConsole(); 61 InGameConsole(const InGameConsole& other) {} 62 ~InGameConsole(); 60 static void openConsole(); 61 static void closeConsole(); 63 62 64 void activate();65 void deactivate();63 private: // functions 64 InGameConsole(const InGameConsole& other) {} 66 65 67 void linesChanged(); 68 void onlyLastLineChanged(); 69 void lineAdded(); 70 void inputChanged(); 71 void cursorChanged(); 72 void exit(); 66 void activate(); 67 void deactivate(); 73 68 74 void shiftLines(); 75 void colourLine(int colourcode, int index); 76 void setCursorPosition(unsigned int pos); 77 void print(const std::string& text, int index, bool alwaysShift = false); 69 void linesChanged(); 70 void onlyLastLineChanged(); 71 void lineAdded(); 72 void inputChanged(); 73 void cursorChanged(); 74 void exit(); 78 75 79 void windowResized(int newWidth, int newHeight); 76 void shiftLines(); 77 void colourLine(int colourcode, int index); 78 void setCursorPosition(unsigned int pos); 79 void print(const std::string& text, int index, bool alwaysShift = false); 80 80 81 static Ogre::UTFString convert2UTF(std::string s);81 void windowResized(int newWidth, int newHeight); 82 82 83 private: // variables 84 bool bActive_; 85 int windowW_; 86 int windowH_; 87 int desiredTextWidth_; 88 unsigned int maxCharsPerLine_; 89 unsigned int numLinesShifted_; 90 int scroll_; 91 float cursor_; 92 unsigned int inputWindowStart_; 93 bool bShowCursor_; 94 std::string displayedText_; 95 Ogre::Overlay* consoleOverlay_; 96 Ogre::OverlayContainer* consoleOverlayContainer_; 97 Ogre::PanelOverlayElement* consoleOverlayNoise_; 98 Ogre::TextAreaOverlayElement* consoleOverlayCursor_; 99 Ogre::BorderPanelOverlayElement* consoleOverlayBorder_; 100 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_; 83 static Ogre::UTFString convert2UTF(std::string s); 101 84 102 // config values 103 float relativeWidth; 104 float relativeHeight; 105 float blinkTime; 106 float scrollSpeed_; 107 float noiseSize_; 108 char cursorSymbol_; 85 private: // variables 86 bool bActive_; 87 int windowW_; 88 int windowH_; 89 int desiredTextWidth_; 90 unsigned int maxCharsPerLine_; 91 unsigned int numLinesShifted_; 92 int scroll_; 93 float cursor_; 94 unsigned int inputWindowStart_; 95 bool bShowCursor_; 96 std::string displayedText_; 97 Ogre::Overlay* consoleOverlay_; 98 Ogre::OverlayContainer* consoleOverlayContainer_; 99 Ogre::PanelOverlayElement* consoleOverlayNoise_; 100 Ogre::TextAreaOverlayElement* consoleOverlayCursor_; 101 Ogre::BorderPanelOverlayElement* consoleOverlayBorder_; 102 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_; 103 104 // config values 105 float relativeWidth; 106 float relativeHeight; 107 float blinkTime; 108 float scrollSpeed_; 109 float noiseSize_; 110 char cursorSymbol_; 111 112 static InGameConsole* singletonRef_s; 109 113 }; 110 114 }
Note: See TracChangeset
for help on using the changeset viewer.