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/orxonox/Orxonox.cc

    r1317 r1334  
    8888  ConsoleCommand(Orxonox, slomo, AccessLevel::Offline, true).setDefaultValue(0, 1.0);
    8989  ConsoleCommand(Orxonox, setTimeFactor, AccessLevel::Offline, false).setDefaultValue(0, 1.0);
    90 /*
    91   class Testconsole : public InputBufferListener
    92   {
    93     public:
    94       Testconsole(InputBuffer* ib) : ib_(ib) {}
    95       void listen() const
    96       {
    97         std::cout << "> " << this->ib_->get() << std::endl;
    98       }
    99       void execute() const
    100       {
    101         std::cout << ">> " << this->ib_->get() << std::endl;
    102         if (!CommandExecutor::execute(this->ib_->get()))
    103           std::cout << "Error" << std::endl;
    104         this->ib_->clear();
    105       }
    106       void hintandcomplete() const
    107       {
    108         std::cout << CommandExecutor::hint(this->ib_->get()) << std::endl;
    109         this->ib_->set(CommandExecutor::complete(this->ib_->get()));
    110       }
    111       void clear() const
    112       {
    113         this->ib_->clear();
    114       }
    115       void removeLast() const
    116       {
    117         this->ib_->removeBehindCursor();
    118       }
    119       void exit() const
    120       {
    121         CommandExecutor::execute("setInputMode 2");
    122       }
    123 
    124     private:
    125       InputBuffer* ib_;
    126   };
    127 */
     90
    12891  class Calculator
    12992  {
     
    421384  void Orxonox::startRenderLoop()
    422385  {
    423 
    424 //    InputBuffer* ib = new InputBuffer();
    425 //    InputManager::getSingleton().feedInputBuffer(ib);
    426     /*
    427     Testconsole* console = new Testconsole(ib);
    428     ib->registerListener(console, &Testconsole::listen, true);
    429     ib->registerListener(console, &Testconsole::execute, '\r', false);
    430     ib->registerListener(console, &Testconsole::hintandcomplete, '\t', true);
    431     ib->registerListener(console, &Testconsole::clear, '§', true);
    432     ib->registerListener(console, &Testconsole::removeLast, '\b', true);
    433     ib->registerListener(console, &Testconsole::exit, (char)0x1B, true);
    434     */
    435     /*
    436     orxonoxConsole_ = new InGameConsole(ib);
    437     ib->registerListener(orxonoxConsole_, &InGameConsole::listen, true);
    438     ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\r', false);
    439     ib->registerListener(orxonoxConsole_, &InGameConsole::hintandcomplete, '\t', true);
    440     ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '§', true);
    441     ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true);
    442     ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true);
    443     */
    444386    // first check whether ogre root object has been created
    445387    if (Ogre::Root::getSingletonPtr() == 0)
     
    490432      for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
    491433        it->tick((float)evt.timeSinceLastFrame * this->timefactor_);
    492 //      orxonoxConsole_->tick((float)evt.timeSinceLastFrame * this->timefactor_);
    493434
    494435      // don't forget to call _fireFrameStarted in ogre to make sure
Note: See TracChangeset for help on using the changeset viewer.