- Timestamp:
- Jun 10, 2009, 10:49:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/orxonox/overlays/console/InGameConsole.cc
r3110 r3142 41 41 #include "util/Convert.h" 42 42 #include "util/Debug.h" 43 #include "util/UTFStringConversions.h" 43 44 #include "core/Clock.h" 44 45 #include "core/CoreIncludes.h" … … 466 467 { 467 468 ++linesUsed; 468 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output.substr(0, this->maxCharsPerLine_)));469 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output.substr(0, this->maxCharsPerLine_))); 469 470 output.erase(0, this->maxCharsPerLine_); 470 471 output.insert(0, 1, ' '); … … 473 474 this->colourLine(level, index); 474 475 } 475 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output));476 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output)); 476 477 this->displayedText_ = output; 477 478 this->numLinesShifted_ = linesUsed; … … 491 492 this->inputWindowStart_ = 0; 492 493 this->displayedText_ = output; 493 this->consoleOverlayTextAreas_[index]->setCaption( convert2UTF(output));494 this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output)); 494 495 } 495 496 } … … 606 607 InGameConsole::getInstance().deactivate(); 607 608 } 608 609 /**610 @brief Converts a string into an Ogre::UTFString.611 @param s The string to convert612 @return The converted string613 */614 /*static*/ Ogre::UTFString InGameConsole::convert2UTF(const std::string& text)615 {616 Ogre::UTFString utf;617 Ogre::UTFString::code_point cp;618 for (unsigned int i = 0; i < text.size(); ++i)619 {620 cp = text[i];621 cp &= 0xFF;622 utf.append(1, cp);623 }624 return utf;625 }626 609 }
Note: See TracChangeset
for help on using the changeset viewer.