Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (15 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gui/GUIManager.cc

    r3196 r3280  
    5353#endif
    5454
     55#include "util/Debug.h"
    5556#include "util/Exception.h"
     57#include "util/OrxAssert.h"
    5658#include "core/Core.h"
    5759#include "core/Clock.h"
     
    6264namespace orxonox
    6365{
     66    class CEGUILogger : public CEGUI::DefaultLogger
     67    {
     68    public:
     69            void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard)
     70        {
     71            int orxonoxLevel;
     72            switch (level)
     73            {
     74                case CEGUI::Errors:      orxonoxLevel = 1; break;
     75                case CEGUI::Warnings:    orxonoxLevel = 2; break;
     76                case CEGUI::Standard:    orxonoxLevel = 4; break;
     77                case CEGUI::Informative: orxonoxLevel = 5; break;
     78                case CEGUI::Insane:      orxonoxLevel = 6; break;
     79                default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
     80            }
     81            OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
     82                << "CEGUI: " << message << std::endl;
     83
     84            CEGUI::DefaultLogger::logEvent(message, level);
     85        }
     86    };
     87
    6488    static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
    6589    GUIManager* GUIManager::singletonRef_s = 0;
     
    140164
    141165                // Create our own logger to specify the filepath
    142                 this->ceguiLogger_ = new DefaultLogger();
     166                this->ceguiLogger_ = new CEGUILogger();
    143167                this->ceguiLogger_->setLogFilename(Core::getLogPathString() + "cegui.log");
    144168                // set the log level according to ours (translate by subtracting 1)
Note: See TracChangeset for help on using the changeset viewer.