Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 2:33:09 AM (17 years ago)
Author:
landauf
Message:

The InGameConsole is now using the new Shell. There's a clear separation between the two classes: InGameConsole implements all graphical parts of the console (and has a tick), while Shell handles the internal actions (like listening on input and output changes). That's why InGameConsole has no longer it's own InputBuffer and doesn't care about command-executing or anything else.

There are currently three new features:

  • Every output through COUT(level) is now visible in the InGameConsole, provided the configured output-level for the shell matches. default: 1 (only forced output and errors)
  • The cursor in the input-line is movable with the left and right arrow keys (home and end works too)
  • You can scroll through all output-lines by pressing page up and page down

There's another feature to come, providing a command history, accessible with up and down arrow keys, but I couldn't finish it yet, because there's still a bug, causing Orxonox to scroll through the entire memory - that's maybe a bit too much history ;)

File:
1 edited

Legend:

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

    r1313 r1322  
    4949    }
    5050
     51    OutputBuffer& OutputBuffer::operator<<(std::ostream& (*manipulator)(std::ostream&))
     52    {
     53                this->stream_ << manipulator;
     54                this->callListeners();
     55                return *this;
     56    }
     57
     58    OutputBuffer& OutputBuffer::operator<<(std::ios& (*manipulator)(std::ios&))
     59    {
     60                this->stream_ << manipulator;
     61                this->callListeners();
     62                return *this;
     63    }
     64
     65    OutputBuffer& OutputBuffer::operator<<(std::ios_base& (*manipulator)(std::ios_base&))
     66    {
     67                this->stream_ << manipulator;
     68                this->callListeners();
     69                return *this;
     70    }
     71
    5172    bool OutputBuffer::getLine(std::string* output)
    5273    {
     
    5980
    6081        if (eof)
     82        {
    6183            this->stream_.flush();
     84            this->stream_.clear();
     85        }
    6286
    63         // Return true if this was a whole new line, ended by \n
    6487        return (!eof);
    6588    }
Note: See TracChangeset for help on using the changeset viewer.