Changeset 1424 for code/branches/console/src/core/Shell.cc
- Timestamp:
- May 25, 2008, 9:58:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/Shell.cc
r1334 r1424 32 32 #include "ConfigValueIncludes.h" 33 33 #include "CoreSettings.h" 34 #include "ConsoleCommand.h" 34 35 35 36 #define SHELL_UPDATE_LISTENERS(function) \ … … 39 40 namespace orxonox 40 41 { 42 SetConsoleCommand(Shell, clearShell, true); 43 SetConsoleCommand(Shell, history, true); 44 41 45 Shell::Shell() 42 46 { … … 104 108 } 105 109 110 void Shell::clearShell() 111 { 112 Shell::getInstance().clearLines(); 113 } 114 115 void Shell::history() 116 { 117 Shell& instance = Shell::getInstance(); 118 119 for (int i = instance.historyOffset_; i < (int)instance.commandHistory_.size(); ++i) 120 instance.addLine(instance.commandHistory_[i], -1); 121 for (int i = 0; i < (int)instance.historyOffset_; ++i) 122 instance.addLine(instance.commandHistory_[i], -1); 123 } 124 106 125 void Shell::registerListener(ShellListener* listener) 107 126 { … … 243 262 void Shell::hintandcomplete() 244 263 { 264 this->inputBuffer_.set(CommandExecutor::complete(this->inputBuffer_.get())); 245 265 this->addLine(CommandExecutor::hint(this->inputBuffer_.get()), -1); 246 this->inputBuffer_.set(CommandExecutor::complete(this->inputBuffer_.get()));247 266 248 267 this->inputChanged();
Note: See TracChangeset
for help on using the changeset viewer.