Changeset 3142
- Timestamp:
- Jun 10, 2009, 10:49:04 PM (15 years ago)
- Location:
- code/branches/pch/src
- Files:
-
- 1 added
- 4 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 } -
code/branches/pch/src/orxonox/overlays/console/InGameConsole.h
r2896 r3142 61 61 static void closeConsole(); 62 62 63 static Ogre::UTFString convert2UTF(const std::string& text);64 65 63 private: // functions 66 64 InGameConsole(const InGameConsole& other); -
code/branches/pch/src/orxonox/overlays/hud/ChatOverlay.cc
r3110 r3142 31 31 #include <OgreTextAreaOverlayElement.h> 32 32 33 #include "util/UTFStringConversions.h" 33 34 #include "core/CoreIncludes.h" 34 35 #include "core/ConfigValueIncludes.h" … … 39 40 #include "PlayerManager.h" 40 41 #include "objects/infos/PlayerInfo.h" 41 #include "overlays/console/InGameConsole.h"42 42 #include "tools/Timer.h" 43 43 … … 86 86 } 87 87 88 this->messages_.push_back( InGameConsole::convert2UTF(text));88 this->messages_.push_back(multi_cast<Ogre::UTFString>(text)); 89 89 COUT(0) << "Chat: " << text << std::endl; 90 90 -
code/branches/pch/src/util/MultiTypeValue.h
r3084 r3142 194 194 saveAndIncrease( this->value_.z, mem ); 195 195 saveAndIncrease( this->value_.w, mem ); 196 }template <> inline uint8_t MT_Value<Ogre::Quaternion>::getSize() const 196 } 197 template <> inline uint8_t MT_Value<Ogre::Quaternion>::getSize() const 197 198 { 198 199 return 4*returnSize(this->value_.x);
Note: See TracChangeset
for help on using the changeset viewer.