Changeset 5787 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- Nov 26, 2005, 10:18:28 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.cc
r5786 r5787 133 133 this->setRelCoorSoft2D(0, 0, 1, 5); 134 134 135 list<char*>::const_reverse_iterator textLine = ShellBuffer::getInstance()->getBuffer()->rbegin(); 135 list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end(); 136 bool top = false; 136 137 for (int i = 0; i < this->bufferDisplaySize; i++) 137 138 { 138 this->bufferText[i]->setText((*textLine), true);139 139 this->bufferText[i]->setVisibility(true); 140 textLine--; 140 if (!top) 141 { 142 this->bufferText[i]->setText((*textLine), true); 143 if (textLine != ShellBuffer::getInstance()->getBuffer()->begin()) 144 top = true; 145 textLine--; 146 } 141 147 } 142 148 } … … 156 162 this->setRelCoorSoft2D(0, -(int)this->shellHeight, 1, 5); 157 163 158 list<char*>::const_ reverse_iterator textLine = ShellBuffer::getInstance()->getBuffer()->rbegin();164 list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end(); 159 165 for (int i = 0; i < this->bufferDisplaySize; i++) 160 166 { 161 this->bufferText[i]->setText((*textLine), false);162 167 this->bufferText[i]->setVisibility(false); 163 textLine--; 168 if (textLine != ShellBuffer::getInstance()->getBuffer()->begin()) 169 { 170 this->bufferText[i]->setText((*textLine), false); 171 textLine--; 172 } 164 173 } 165 174 this->bufferOffset = 0; … … 304 313 } 305 314 306 list<char*>::const_ reverse_iterator textLine = ShellBuffer::getInstance()->getBuffer()->rbegin();315 list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end(); 307 316 bufferText = new Text*[bufferDisplaySize]; 308 317 for (unsigned int i = 0; i < bufferDisplaySize; i++) … … 310 319 bufferText[i] = new Text(this->fontFile, this->textSize); 311 320 bufferText[i]->setAlignment(TEXT_ALIGN_LEFT); 312 bufferText[i]->setText(*textLine);313 321 bufferText[i]->setParent2D(this); 314 textLine--; 322 if(textLine != ShellBuffer::getInstance()->getBuffer()->begin()) 323 { 324 bufferText[i]->setText(*textLine); 325 textLine--; 326 } 315 327 } 316 328 this->bufferDisplaySize = bufferDisplaySize; -
trunk/src/lib/shell/shell_input.cc
r5786 r5787 385 385 else // if(!event.bPressed) 386 386 { 387 if (this->pressedKey == event.x )387 if (this->pressedKey == event.x || this->pressedKey == event.type) 388 388 { 389 389 this->pressedKey = 0;
Note: See TracChangeset
for help on using the changeset viewer.