Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 9:20:47 AM (15 years ago)
Author:
rgrieder
Message:

Merged pch branch back to trunk.

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r3110 r3196  
    3535#include <OgreOverlayManager.h>
    3636#include <OgreOverlayContainer.h>
     37#include <OgreBorderPanelOverlayElement.h>
     38#include <OgreTextAreaOverlayElement.h>
    3739#include <OgreFontManager.h>
    3840#include <OgreFont.h>
     
    4042#include "util/Math.h"
    4143#include "util/Convert.h"
    42 #include "util/Debug.h"
     44#include "util/UTFStringConversions.h"
    4345#include "core/Clock.h"
    4446#include "core/CoreIncludes.h"
     
    466468                {
    467469                    ++linesUsed;
    468                     this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output.substr(0, this->maxCharsPerLine_)));
     470                    this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output.substr(0, this->maxCharsPerLine_)));
    469471                    output.erase(0, this->maxCharsPerLine_);
    470472                    output.insert(0, 1, ' ');
     
    473475                    this->colourLine(level, index);
    474476                }
    475                 this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output));
     477                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
    476478                this->displayedText_ = output;
    477479                this->numLinesShifted_ = linesUsed;
     
    491493                  this->inputWindowStart_ = 0;
    492494                this->displayedText_ = output;
    493                 this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output));
     495                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
    494496            }
    495497        }
     
    606608        InGameConsole::getInstance().deactivate();
    607609    }
    608 
    609     /**
    610         @brief Converts a string into an Ogre::UTFString.
    611         @param s The string to convert
    612         @return The converted string
    613     */
    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     }
    626610}
  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r2896 r3196  
    3232
    3333#include "OrxonoxPrereqs.h"
    34 #include <OgrePrerequisites.h>
    35 #include <OgreBorderPanelOverlayElement.h>
    36 #include <OgreTextAreaOverlayElement.h>
    3734
     35#include <string>
     36#include "util/OgreForwardRefs.h"
    3837#include "core/Shell.h"
    39 #include "core/OrxonoxClass.h"
    40 #include "tools/WindowEventListener.h"
    41 
     38#include "interfaces/WindowEventListener.h"
    4239
    4340namespace orxonox
    4441{
    45     class _OrxonoxExport InGameConsole : virtual public OrxonoxClass, public ShellListener, public WindowEventListener
     42    class _OrxonoxExport InGameConsole : public ShellListener, public WindowEventListener
    4643    {
    4744    public: // functions
     
    6057        static void openConsole();
    6158        static void closeConsole();
    62 
    63         static Ogre::UTFString convert2UTF(const std::string& text);
    6459
    6560    private: // functions
Note: See TracChangeset for help on using the changeset viewer.