Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2008, 1:48:40 AM (17 years ago)
Author:
landauf
Message:
  • added colored output in the InGameConsole, depending on the output level (error = red, …).
  • increased performance of InGameConsole and Shell
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/Shell.cc

    r1327 r1334  
    4848        this->historyOffset_ = 0;
    4949        this->finishedLastLine_ = true;
     50        this->bAddOutputLevel_ = false;
    5051
    5152        this->clearLines();
     
    131132    }
    132133
    133     void Shell::addLine(const std::string& line, unsigned int level)
     134    void Shell::addLine(const std::string& line, int level)
    134135    {
    135136        int original_level = OutputHandler::getOutStream().getOutputLevel();
     
    196197            if (this->finishedLastLine_)
    197198            {
     199                if (this->bAddOutputLevel_)
     200                    output.insert(0, 1, (char)OutputHandler::getOutStream().getOutputLevel());
     201
    198202                this->lines_.insert(this->lines_.begin(), output);
    199203
     
    239243    void Shell::hintandcomplete()
    240244    {
    241         this->addLine(CommandExecutor::hint(this->inputBuffer_.get()), 0);
     245        this->addLine(CommandExecutor::hint(this->inputBuffer_.get()), -1);
    242246        this->inputBuffer_.set(CommandExecutor::complete(this->inputBuffer_.get()));
    243247
Note: See TracChangeset for help on using the changeset viewer.