Changeset 5246 in orxonox.OLD for trunk/src/lib/shell/shell.cc
- Timestamp:
- Sep 24, 2005, 9:20:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.cc
r5245 r5246 56 56 // EVENT-Handler subscription of '`' to all States. 57 57 EventHandler::getInstance()->subscribe(this, ES_ALL, SDLK_BACKQUOTE); 58 EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEUP); 59 EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEDOWN); 58 60 59 61 // Element2D and generals … … 66 68 this->bufferText = NULL; 67 69 this->bufferDisplaySize = 10; 70 this->bufferOffset = 0; 68 71 69 72 // INPUT LINE … … 72 75 73 76 this->rebuildText(); 74 75 77 } 76 78 … … 104 106 this->setRelCoorSoft2D(0, 0, 1, 5); 105 107 106 ShellBuffer::getInstance()->getBufferIterator()->lastElement(); 107 for (unsigned int i = 0; i < this->bufferDisplaySize; i++) 108 this->bufferText[i]->setText(ShellBuffer::getInstance()->getBufferIterator()->prevElement(), true); 108 tIterator<char>* bufferIT = ShellBuffer::getInstance()->getBuffer()->getIterator(); 109 bufferIT->lastElement(); 110 for (int i = 0; i < this->bufferDisplaySize; i++) 111 this->bufferText[i]->setText(bufferIT->prevElement(), true); 112 delete bufferIT; 109 113 } 110 114 … … 121 125 this->setRelCoorSoft2D(0, -400, 1, 5); 122 126 123 ShellBuffer::getInstance()->getBufferIterator()->lastElement(); 127 tIterator<char>* bufferIT = ShellBuffer::getInstance()->getBuffer()->getIterator(); 128 bufferIT->lastElement(); 124 129 for (int i = 0; i < this->bufferDisplaySize; i++) 125 this->bufferText[i]->setText( ShellBuffer::getInstance()->getBufferIterator()->prevElement(), false);126 } 127 130 this->bufferText[i]->setText(bufferIT->prevElement(), false); 131 delete bufferIT; 132 } 128 133 129 134 /** … … 199 204 this->bufferText[i]->setText(NULL, true); 200 205 } 201 // BUFFER FLUSHING 206 207 ShellBuffer::getInstance()->flush(); 208 // BUFFER FLUSHING 202 209 } 203 210 … … 231 238 232 239 /** 240 * moves the Display buffer (up or down) 241 * @param lineCount the count by which to shift the InputBuffer. 242 */ 243 void Shell::moveDisplayBuffer(int lineCount) 244 { 245 246 247 } 248 249 /** 233 250 * clears the Shell (empties all buffers) 234 251 */ … … 253 270 else 254 271 this->deactivate(); 272 } 273 else if (event.type == SDLK_PAGEUP) 274 { 275 276 } 277 else if (event.type == SDLK_PAGEDOWN) 278 { 279 255 280 } 256 281 }
Note: See TracChangeset
for help on using the changeset viewer.