Changeset 1538 for code/trunk/src/orxonox/console
- Timestamp:
- Jun 4, 2008, 10:44:41 PM (17 years ago)
- Location:
- code/trunk/src/orxonox/console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/console/InGameConsole.cc
r1535 r1538 299 299 300 300 this->linesChanged(); 301 this->cursorChanged(); 301 302 } 302 303 … … 372 373 Shell::getInstance().registerListener(this); 373 374 this->linesChanged(); 375 this->cursorChanged(); 374 376 375 377 this->consoleOverlay_->show(); … … 460 462 } 461 463 462 void InGameConsole::setCursorPosition( int pos)464 void InGameConsole::setCursorPosition(unsigned int pos) 463 465 { 464 466 static std::string char1 = "bdefgilpqtzCEGIJKNOPQT5[}äü"; … … 471 473 472 474 float width = 0; 473 for ( int i = 0; i < pos; ++i)475 for (unsigned int i = 0; i < pos && i < displayedText_.size(); ++i) 474 476 { 475 477 if (char1.find(displayedText_[i]) != std::string::npos) -
code/trunk/src/orxonox/console/InGameConsole.h
r1535 r1538 72 72 void shiftLines(); 73 73 void colourLine(int colourcode, int index); 74 void setCursorPosition( int pos);74 void setCursorPosition(unsigned int pos); 75 75 void print(const std::string& text, int index, bool alwaysShift = false); 76 76 static Ogre::UTFString convert2UTF(std::string s);
Note: See TracChangeset
for help on using the changeset viewer.