Changeset 8858 for code/trunk/src/orxonox/overlays
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/orxonox/overlays/InGameConsole.cc
r8729 r8858 46 46 #include "util/DisplayStringConversions.h" 47 47 #include "util/ScopedSingletonManager.h" 48 #include "util/output/MemoryWriter.h" 48 49 #include "core/CoreIncludes.h" 49 50 #include "core/ConfigValueIncludes.h" … … 58 59 { 59 60 const int LINES = 30; 60 const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically61 const float CHAR_WIDTH = 8.0f; // fix this please - determine the char-width dynamically 61 62 62 63 SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole); … … 94 95 // Output buffering is not anymore needed. Not the best solution to do 95 96 // this here, but there isn't much of another way. 96 OutputHandler::getInstance().disableMemoryLog();97 MemoryWriter::getInstance().disable(); 97 98 } 98 99 … … 262 263 this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight); 263 264 264 COUT(4) << "Info: InGameConsole initialized" << std::endl;265 orxout(internal_info) << "InGameConsole initialized" << endl; 265 266 } 266 267 … … 288 289 289 290 for (int i = LINES - 1; i > max; --i) 290 this->print("", Shell:: None, i, true);291 this->print("", Shell::DebugOutput, i, true); 291 292 292 293 for (int i = max; i >= 1; --i) … … 298 299 299 300 /** 300 @brief Called if only the last output-line has changed. 301 */ 302 void InGameConsole::onlyLastLineChanged() 303 { 301 @brief Called if a new output-line was added. 302 */ 303 void InGameConsole::lineAdded() 304 { 305 this->numLinesShifted_ = 0; 306 this->shiftLines(); 304 307 if (LINES > 1) 305 308 this->print(this->shell_->getNewestLineIterator()->first, this->shell_->getNewestLineIterator()->second, 1); 306 }307 308 /**309 @brief Called if a new output-line was added.310 */311 void InGameConsole::lineAdded()312 {313 this->numLinesShifted_ = 0;314 this->shiftLines();315 this->onlyLastLineChanged();316 309 } 317 310 … … 346 339 void InGameConsole::executed() 347 340 { 348 this->shell_->addOutput(this->shell_->getInput() + '\n', Shell::Command);341 this->shell_->addOutput(this->shell_->getInput(), Shell::Command); 349 342 } 350 343 … … 437 430 438 431 // now adjust the text lines... 439 this->desiredTextWidth_ = static_cast<int>(this->windowW_ * this->relativeWidth) - 12;432 this->desiredTextWidth_ = static_cast<int>(this->windowW_ * this->relativeWidth) - 24; 440 433 441 434 if (LINES > 0) … … 566 559 switch (type) 567 560 { 568 case Shell::Error: colourTop = ColourValue(0.95f, 0.25f, 0.25f, 1.00f); 569 colourBottom = ColourValue(1.00f, 0.50f, 0.50f, 1.00f); break; 570 571 case Shell::Warning: colourTop = ColourValue(0.95f, 0.50f, 0.20f, 1.00f); 572 colourBottom = ColourValue(1.00f, 0.70f, 0.50f, 1.00f); break; 573 574 case Shell::Info: colourTop = ColourValue(0.50f, 0.50f, 0.95f, 1.00f); 575 colourBottom = ColourValue(0.80f, 0.80f, 1.00f, 1.00f); break; 576 577 case Shell::Debug: colourTop = ColourValue(0.65f, 0.48f, 0.44f, 1.00f); 578 colourBottom = ColourValue(1.00f, 0.90f, 0.90f, 1.00f); break; 579 580 case Shell::Verbose: colourTop = ColourValue(0.40f, 0.20f, 0.40f, 1.00f); 581 colourBottom = ColourValue(0.80f, 0.60f, 0.80f, 1.00f); break; 582 583 case Shell::Ultra: colourTop = ColourValue(0.21f, 0.69f, 0.21f, 1.00f); 584 colourBottom = ColourValue(0.80f, 1.00f, 0.80f, 1.00f); break; 585 586 case Shell::Command: colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f); 587 colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 0.90f); break; 588 589 case Shell::Hint: colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f); 590 colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); break; 591 592 case Shell::TDebug: colourTop = ColourValue(0.90f, 0.00f, 0.90f, 1.00f); 593 colourBottom = ColourValue(1.00f, 0.00f, 1.00f, 1.00f); break; 594 595 default: colourTop = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); 596 colourBottom = ColourValue(1.00f, 1.00f, 1.00f, 1.00f); break; 597 } 561 case Shell::Message: 562 case Shell::DebugOutput: colourTop = ColourValue(0.9f, 0.9f, 0.9f); break; 563 564 case Shell::UserError: colourTop = ColourValue(0.9f, 0.0f, 0.0f); break; 565 case Shell::UserWarning: colourTop = ColourValue(0.9f, 0.5f, 0.0f); break; 566 case Shell::UserStatus: colourTop = ColourValue(0.0f, 0.9f, 0.0f); break; 567 case Shell::UserInfo: colourTop = ColourValue(0.0f, 0.8f, 0.8f); break; 568 569 case Shell::InternalError: colourTop = ColourValue(0.5f, 0.0f, 0.0f); break; 570 case Shell::InternalWarning: colourTop = ColourValue(0.5f, 0.2f, 0.0f); break; 571 case Shell::InternalStatus: colourTop = ColourValue(0.0f, 0.5f, 0.0f); break; 572 case Shell::InternalInfo: colourTop = ColourValue(0.0f, 0.4f, 0.4f); break; 573 574 case Shell::Verbose: colourTop = ColourValue(0.3f, 0.3f, 0.9f); break; 575 case Shell::VerboseMore: colourTop = ColourValue(0.2f, 0.2f, 0.7f); break; 576 case Shell::VerboseUltra: colourTop = ColourValue(0.1f, 0.1f, 0.5f); break; 577 578 case Shell::Command: colourTop = ColourValue(0.8f, 0.2f, 0.8f); break; 579 case Shell::Hint: colourTop = ColourValue(0.4f, 0.0f, 0.4f); break; 580 case Shell::Input: colourTop = ColourValue(0.9f, 0.9f, 0.9f); break; 581 582 default: colourTop = ColourValue(0.5f, 0.5f, 0.5f); break; 583 } 584 585 colourBottom = ColourValue(sqrt(colourTop.r), sqrt(colourTop.g), sqrt(colourTop.b)); 598 586 599 587 this->consoleOverlayTextAreas_[index]->setColourTop (colourTop); -
code/trunk/src/orxonox/overlays/InGameConsole.h
r7284 r8858 64 64 65 65 void linesChanged(); 66 void onlyLastLineChanged();67 66 void lineAdded(); 68 67 void inputChanged(); -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r8706 r8858 147 147 148 148 if (OrxonoxOverlay::overlays_s.find(this->getName()) != OrxonoxOverlay::overlays_s.end()) 149 COUT(1) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << std::endl;149 orxout(internal_warning) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << endl; 150 150 151 151 OrxonoxOverlay::overlays_s[this->getName()] = this; … … 362 362 { 363 363 overlay->hide(); 364 COUT(4) << "HIDE " << name << std::endl;364 orxout(verbose, context::misc::overlays) << "HIDE " << name << endl; 365 365 } 366 366 else 367 367 { 368 368 overlay->show(); 369 COUT(4) << "SHOW " << name << std::endl;369 orxout(verbose, context::misc::overlays) << "SHOW " << name << endl; 370 370 } 371 371 }
Note: See TracChangeset
for help on using the changeset viewer.