Changeset 5380 in orxonox.OLD for branches/2d-recalc/src/lib/shell
- Timestamp:
- Oct 15, 2005, 1:49:17 AM (19 years ago)
- Location:
- branches/2d-recalc/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2d-recalc/src/lib/shell/shell.cc
r5377 r5380 81 81 this->backgroundMaterial = new Material; 82 82 // Element2D and generals 83 this->setAbsCoor2D(3, -400); 84 this->textSize = 20; 85 this->lineSpacing = 0; 83 this->textSize = .001; 84 this->lineSpacing = .001; 86 85 this->bActive = false; 87 86 this->fontFile = new char[strlen(SHELL_DEFAULT_FONT)+1]; … … 93 92 this->setTextColor(SHELL_DEFAULT_TEXT_COLOR); 94 93 this->setBackgroundColor(SHELL_DEFAULT_BACKGROUND_COLOR); 95 94 this->setRelCoor2D(0,-this->shellHeight, 0); 96 95 // register the shell at the ShellBuffer 97 96 ShellBuffer::getInstance()->registerShell(this); … … 128 127 129 128 EventHandler::getInstance()->setState(ES_SHELL); 130 this->setRelCoorSoft2D(0, 0, 1, 5);129 this->setRelCoorSoft2D(0, 0, 0, 5); 131 130 132 131 tIterator<char>* bufferIT = ShellBuffer::getInstance()->getBuffer()->getIterator(); … … 250 249 if (this->shellInput != NULL) 251 250 { 252 this->shellInput->setSize (this->textSize);251 this->shellInput->setSizeY2D(this->textSize); 253 252 this->shellInput->setColor(this->textColor[0], this->textColor[1], this->textColor[2]); 254 253 this->shellInput->setBlending(this->textColor[3]); 255 this->shellInput->setRelCoor2D( 5, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize);254 this->shellInput->setRelCoor2D(.005, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize); 256 255 } 257 256 … … 262 261 if (this->bufferText[i] != NULL) 263 262 { 264 this->bufferText[i]->setSize (this->textSize);263 this->bufferText[i]->setSizeY2D(this->textSize); 265 264 this->bufferText[i]->setColor(this->textColor[0], this->textColor[1], this->textColor[2]); 266 265 this->bufferText[i]->setBlending(this->textColor[3]); … … 269 268 } 270 269 } 271 this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1); 272 270 this->shellHeight = (float)(this->textSize + this->lineSpacing) * (bufferDisplaySize+1.0); 273 271 } 274 272 … … 365 363 */ 366 364 lastText->setRelDir2D(-90); 367 lastText->setRelDirSoft2D(0, 1 0);368 lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1 000,0,0));365 lastText->setRelDirSoft2D(0, 1); 366 lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1,0,0)); 369 367 lastText->setRelCoorSoft2D(this->calculateLinePosition(0),10); 370 368 … … 478 476 479 477 glTexCoord2f(1, 0); 480 glVertex2f( GraphicsEngine::getInstance()->getResolutionX()- this->getAbsCoor2D().x, this->getAbsCoor2D().y );478 glVertex2f(1 - this->getAbsCoor2D().x, this->getAbsCoor2D().y ); 481 479 482 480 glTexCoord2f(0, 1); … … 484 482 485 483 glTexCoord2f(1, 1); 486 glVertex2f( GraphicsEngine::getInstance()->getResolutionX()- this->getAbsCoor2D().x, this->getAbsCoor2D().y + this->shellHeight);484 glVertex2f(1 - this->getAbsCoor2D().x, this->getAbsCoor2D().y + this->shellHeight); 487 485 488 486 glEnd(); -
branches/2d-recalc/src/lib/shell/shell.h
r5374 r5380 92 92 // GENERAL 93 93 bool bActive; //!< If the shell is active. 94 unsigned intshellHeight; //!< The hight of the Shell in Pixels.95 unsigned intlineSpacing; //!< The Spacing between lines.96 unsigned inttextSize; //!< The size of the text.94 float shellHeight; //!< The hight of the Shell in Pixels. 95 float lineSpacing; //!< The Spacing between lines. 96 float textSize; //!< The size of the text. 97 97 float textColor[4]; //!< The text's color [r,g,b,a]. 98 98 char* fontFile; //!< The file containing the font.
Note: See TracChangeset
for help on using the changeset viewer.