Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

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

    r10624 r11071  
    7575        : shell_(new Shell("InGameConsole", true))
    7676        , bShowCursor_(false)
    77         , consoleOverlay_(0)
    78         , consoleOverlayContainer_(0)
    79         , consoleOverlayNoise_(0)
    80         , consoleOverlayCursor_(0)
    81         , consoleOverlayBorder_(0)
    82         , consoleOverlayTextAreas_(0)
    83         , inputState_(0)
     77        , consoleOverlay_(nullptr)
     78        , consoleOverlayContainer_(nullptr)
     79        , consoleOverlayNoise_(nullptr)
     80        , consoleOverlayCursor_(nullptr)
     81        , consoleOverlayBorder_(nullptr)
     82        , consoleOverlayTextAreas_(nullptr)
     83        , inputState_(nullptr)
    8484    {
    8585        RegisterObject(InGameConsole);
     
    130130                    if (this->consoleOverlayTextAreas_[i])
    131131                        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayTextAreas_[i]);
    132                     this->consoleOverlayTextAreas_[i] = 0;
     132                    this->consoleOverlayTextAreas_[i] = nullptr;
    133133                }
    134134
     
    140140        {
    141141            delete[] this->consoleOverlayTextAreas_;
    142             this->consoleOverlayTextAreas_ = 0;
     142            this->consoleOverlayTextAreas_ = nullptr;
    143143        }
    144144
     
    175175            else
    176176            {
    177                 inputState_->setMouseHandler(0);
    178                 inputState_->setJoyStickHandler(0);
     177                inputState_->setMouseHandler(nullptr);
     178                inputState_->setJoyStickHandler(nullptr);
    179179            }
    180180        }
     
    292292
    293293        for (int i = LINES - 1; i > max; --i)
    294             this->print("", Shell::DebugOutput, i, true);
     294            this->print("", Shell::LineType::DebugOutput, i, true);
    295295
    296296        for (int i = max; i >= 1; --i)
     
    318318    {
    319319        if (LINES > 0)
    320             this->print(this->shell_->getInput(), Shell::Input, 0);
     320            this->print(this->shell_->getInput(), Shell::LineType::Input, 0);
    321321
    322322        if (this->shell_->getInput().empty())
     
    342342    void InGameConsole::executed()
    343343    {
    344         this->shell_->addOutput(this->shell_->getInput(), Shell::Command);
     344        this->shell_->addOutput(this->shell_->getInput(), Shell::LineType::Command);
    345345    }
    346346
     
    562562        switch (type)
    563563        {
    564             case Shell::Message:
    565             case Shell::DebugOutput:     colourTop = ColourValue(0.9f, 0.9f, 0.9f); break;
    566 
    567             case Shell::UserError:       colourTop = ColourValue(0.9f, 0.0f, 0.0f); break;
    568             case Shell::UserWarning:     colourTop = ColourValue(0.9f, 0.5f, 0.0f); break;
    569             case Shell::UserStatus:      colourTop = ColourValue(0.0f, 0.9f, 0.0f); break;
    570             case Shell::UserInfo:        colourTop = ColourValue(0.0f, 0.8f, 0.8f); break;
    571 
    572             case Shell::InternalError:   colourTop = ColourValue(0.5f, 0.0f, 0.0f); break;
    573             case Shell::InternalWarning: colourTop = ColourValue(0.5f, 0.2f, 0.0f); break;
    574             case Shell::InternalStatus:  colourTop = ColourValue(0.0f, 0.5f, 0.0f); break;
    575             case Shell::InternalInfo:    colourTop = ColourValue(0.0f, 0.4f, 0.4f); break;
    576 
    577             case Shell::Verbose:         colourTop = ColourValue(0.3f, 0.3f, 0.9f); break;
    578             case Shell::VerboseMore:     colourTop = ColourValue(0.2f, 0.2f, 0.7f); break;
    579             case Shell::VerboseUltra:    colourTop = ColourValue(0.1f, 0.1f, 0.5f); break;
    580 
    581             case Shell::Command:         colourTop = ColourValue(0.8f, 0.2f, 0.8f); break;
    582             case Shell::Hint:            colourTop = ColourValue(0.4f, 0.0f, 0.4f); break;
    583             case Shell::Input:           colourTop = ColourValue(0.9f, 0.9f, 0.9f); break;
    584 
    585             default:                     colourTop = ColourValue(0.5f, 0.5f, 0.5f); break;
     564            case Shell::LineType::Message:
     565            case Shell::LineType::DebugOutput:     colourTop = ColourValue(0.9f, 0.9f, 0.9f); break;
     566
     567            case Shell::LineType::UserError:       colourTop = ColourValue(0.9f, 0.0f, 0.0f); break;
     568            case Shell::LineType::UserWarning:     colourTop = ColourValue(0.9f, 0.5f, 0.0f); break;
     569            case Shell::LineType::UserStatus:      colourTop = ColourValue(0.0f, 0.9f, 0.0f); break;
     570            case Shell::LineType::UserInfo:        colourTop = ColourValue(0.0f, 0.8f, 0.8f); break;
     571
     572            case Shell::LineType::InternalError:   colourTop = ColourValue(0.5f, 0.0f, 0.0f); break;
     573            case Shell::LineType::InternalWarning: colourTop = ColourValue(0.5f, 0.2f, 0.0f); break;
     574            case Shell::LineType::InternalStatus:  colourTop = ColourValue(0.0f, 0.5f, 0.0f); break;
     575            case Shell::LineType::InternalInfo:    colourTop = ColourValue(0.0f, 0.4f, 0.4f); break;
     576
     577            case Shell::LineType::Verbose:         colourTop = ColourValue(0.3f, 0.3f, 0.9f); break;
     578            case Shell::LineType::VerboseMore:     colourTop = ColourValue(0.2f, 0.2f, 0.7f); break;
     579            case Shell::LineType::VerboseUltra:    colourTop = ColourValue(0.1f, 0.1f, 0.5f); break;
     580
     581            case Shell::LineType::Command:         colourTop = ColourValue(0.8f, 0.2f, 0.8f); break;
     582            case Shell::LineType::Hint:            colourTop = ColourValue(0.4f, 0.0f, 0.4f); break;
     583            case Shell::LineType::Input:           colourTop = ColourValue(0.9f, 0.9f, 0.9f); break;
     584
     585            default:                               colourTop = ColourValue(0.5f, 0.5f, 0.5f); break;
    586586        }
    587587
Note: See TracChangeset for help on using the changeset viewer.