Changeset 1181 for code/branches/console/src/orxonox
- Timestamp:
- Apr 24, 2008, 7:14:54 PM (17 years ago)
- Location:
- code/branches/console/src/orxonox/console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/orxonox/console/InGameConsole.cc
r1169 r1181 68 68 void InGameConsole::listen(){ 69 69 if(!active) activate(); 70 print( this->ib_->get());70 print(convert2UTF(this->ib_->get())); 71 71 } 72 72 … … 84 84 newline(); 85 85 this->ib_->set(CommandExecutor::complete(this->ib_->get())); 86 print( this->ib_->get());86 print(convert2UTF(this->ib_->get())); 87 87 } 88 88 … … 196 196 cursor += dt; 197 197 if(cursor >= 2*BLINK) cursor = 0; 198 print( this->ib_->get());198 print(convert2UTF(this->ib_->get())); 199 199 200 200 // this creates a flickering effect … … 244 244 @param s string to be printed 245 245 */ 246 void InGameConsole::print( std::string s){247 if(cursor>BLINK) consoleOverlayTextAreas[0]->setCaption(">" + convert2UTF(s));248 else consoleOverlayTextAreas[0]->setCaption(">" + convert2UTF(s)+ "_");246 void InGameConsole::print(Ogre::UTFString s){ 247 if(cursor>BLINK) consoleOverlayTextAreas[0]->setCaption(">" + s); 248 else consoleOverlayTextAreas[0]->setCaption(">" + s + "_"); 249 249 } 250 250 … … 253 253 */ 254 254 void InGameConsole::newline(){ 255 std::string line;255 Ogre::UTFString line; 256 256 for(int i = LINES-1; i>=1; i--){ 257 257 line = consoleOverlayTextAreas[i-1]->getCaption(); … … 259 259 int l = line.length(); 260 260 if(!line.empty() && line.substr(l-1) == "_") line.erase(l-1); 261 consoleOverlayTextAreas[i]->setCaption( convert2UTF(line));261 consoleOverlayTextAreas[i]->setCaption(line); 262 262 } 263 263 consoleOverlayTextAreas[0]->setCaption(">"); -
code/branches/console/src/orxonox/console/InGameConsole.h
r1169 r1181 60 60 private: 61 61 void resize(); 62 void print( std::string s);62 void print(Ogre::UTFString s); 63 63 void newline(); 64 64 Ogre::UTFString convert2UTF(std::string s);
Note: See TracChangeset
for help on using the changeset viewer.