Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 4, 2008, 10:44:41 PM (17 years ago)
Author:
rgrieder
Message:
  • fixed a bug in cursorChanged in InGameConsole
  • prevented Ogre from displaying unnecessary exceptions when ogre.cfg is not present
Location:
code/trunk/src/orxonox/console
Files:
2 edited

Legend:

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

    r1535 r1538  
    299299
    300300        this->linesChanged();
     301        this->cursorChanged();
    301302    }
    302303
     
    372373        Shell::getInstance().registerListener(this);
    373374        this->linesChanged();
     375        this->cursorChanged();
    374376
    375377        this->consoleOverlay_->show();
     
    460462    }
    461463
    462     void InGameConsole::setCursorPosition(int pos)
     464    void InGameConsole::setCursorPosition(unsigned int pos)
    463465    {
    464466        static std::string char1 = "bdefgilpqtzCEGIJKNOPQT5[}äü";
     
    471473
    472474        float width = 0;
    473         for (int i = 0; i < pos; ++i)
     475        for (unsigned int i = 0; i < pos && i < displayedText_.size(); ++i)
    474476        {
    475477            if (char1.find(displayedText_[i]) != std::string::npos)
  • code/trunk/src/orxonox/console/InGameConsole.h

    r1535 r1538  
    7272            void shiftLines();
    7373            void colourLine(int colourcode, int index);
    74             void setCursorPosition(int pos);
     74            void setCursorPosition(unsigned int pos);
    7575            void print(const std::string& text, int index, bool alwaysShift = false);
    7676            static Ogre::UTFString convert2UTF(std::string s);
Note: See TracChangeset for help on using the changeset viewer.