Changeset 1747 for code/trunk/src/core/Shell.cc
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/core/Shell.cc
r1540 r1747 34 34 #include "ConsoleCommand.h" 35 35 #include "input/InputInterfaces.h" 36 #include "util/OutputHandler.h" 36 37 37 38 #define SHELL_UPDATE_LISTENERS(function) \ … … 43 44 SetConsoleCommand(Shell, clearShell, true); 44 45 SetConsoleCommand(Shell, history, true); 46 47 SetConsoleCommandShortcut(OutputHandler, log); 48 SetConsoleCommandShortcut(OutputHandler, error); 49 SetConsoleCommandShortcut(OutputHandler, warning); 50 SetConsoleCommandShortcut(OutputHandler, info); 51 SetConsoleCommandShortcut(OutputHandler, debug); 45 52 46 53 Shell::Shell() … … 61 68 62 69 this->outputBuffer_.registerListener(this); 70 OutputHandler::getOutStream().setOutputBuffer(this->outputBuffer_); 63 71 64 72 this->setConfigValues(); … … 82 90 void Shell::setConfigValues() 83 91 { 84 SetConfigValue(maxHistoryLength_, 100) ;85 SetConfigValue(historyOffset_, 0) ;92 SetConfigValue(maxHistoryLength_, 100).callback(this, &Shell::commandHistoryLengthChanged); 93 SetConfigValue(historyOffset_, 0).callback(this, &Shell::commandHistoryOffsetChanged); 86 94 SetConfigValueVector(commandHistory_, std::vector<std::string>()); 87 95 } 96 97 void Shell::commandHistoryOffsetChanged() 98 { 88 99 if (this->historyOffset_ >= this->maxHistoryLength_) 89 100 this->historyOffset_ = 0; 101 } 102 103 void Shell::commandHistoryLengthChanged() 104 { 105 this->commandHistoryOffsetChanged(); 90 106 91 107 while (this->commandHistory_.size() > this->maxHistoryLength_)
Note: See TracChangeset
for help on using the changeset viewer.