Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1181


Ignore:
Timestamp:
Apr 24, 2008, 7:14:54 PM (16 years ago)
Author:
FelixSchulthess
Message:

fiddling with umlauts

Location:
code/branches/console/src/orxonox/console
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/orxonox/console/InGameConsole.cc

    r1169 r1181  
    6868    void InGameConsole::listen(){
    6969        if(!active) activate();
    70         print(this->ib_->get());
     70        print(convert2UTF(this->ib_->get()));
    7171    }
    7272
     
    8484        newline();
    8585        this->ib_->set(CommandExecutor::complete(this->ib_->get()));
    86         print(this->ib_->get());
     86        print(convert2UTF(this->ib_->get()));
    8787    }
    8888
     
    196196        cursor += dt;
    197197        if(cursor >= 2*BLINK) cursor = 0;
    198         print(this->ib_->get());
     198        print(convert2UTF(this->ib_->get()));
    199199
    200200// this creates a flickering effect
     
    244244    @param s string to be printed
    245245    */
    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 + "_");
    249249    }
    250250
     
    253253    */
    254254    void InGameConsole::newline(){
    255         std::string line;
     255        Ogre::UTFString line;
    256256        for(int i = LINES-1; i>=1; i--){
    257257            line = consoleOverlayTextAreas[i-1]->getCaption();
     
    259259            int l = line.length();
    260260            if(!line.empty() && line.substr(l-1) == "_") line.erase(l-1);
    261             consoleOverlayTextAreas[i]->setCaption(convert2UTF(line));
     261            consoleOverlayTextAreas[i]->setCaption(line);
    262262        }
    263263        consoleOverlayTextAreas[0]->setCaption(">");
  • code/branches/console/src/orxonox/console/InGameConsole.h

    r1169 r1181  
    6060        private:
    6161            void resize();
    62             void print(std::string s);
     62            void print(Ogre::UTFString s);
    6363            void newline();
    6464            Ogre::UTFString convert2UTF(std::string s);
Note: See TracChangeset for help on using the changeset viewer.