- Timestamp:
- Aug 21, 2005, 8:50:22 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/glmenu/glmenu_imagescreen.cc
r4836 r5090 44 44 // End of Background image code. 45 45 46 if (root )46 if (root != NULL) 47 47 this->loadParams(root); 48 48 } -
trunk/src/lib/graphics/render2D/element_2d.cc
r5089 r5090 194 194 void Element2D::setRelCoor2Dpx (int x, int y) 195 195 { 196 this->setRelCoor2D(Vector((float) GraphicsEngine::getInstance()->getResolutionX()/(float)x,197 (float) GraphicsEngine::getInstance()->getResolutionY()/(float)y,196 this->setRelCoor2D(Vector((float)x/(float)GraphicsEngine::getInstance()->getResolutionX(), 197 (float)y/(float)GraphicsEngine::getInstance()->getResolutionY(), 198 198 0 199 199 )); … … 212 212 void Element2D::setRelCoorSoft2Dpx (int x, int y, float bias) 213 213 { 214 this->setRelCoorSoft2D(Vector((float) GraphicsEngine::getInstance()->getResolutionX()/(float)x,215 (float) GraphicsEngine::getInstance()->getResolutionY()/(float)y,214 this->setRelCoorSoft2D(Vector((float)x/(float)GraphicsEngine::getInstance()->getResolutionX(), 215 (float)y/(float)GraphicsEngine::getInstance()->getResolutionY(), 216 216 0), 217 217 bias); … … 253 253 void Element2D::setAbsCoor2Dpx (int x, int y) 254 254 { 255 this->setAbsCoor2D(Vector((float) GraphicsEngine::getInstance()->getResolutionX()/(float)x,256 (float) GraphicsEngine::getInstance()->getResolutionY()/(float)y,255 this->setAbsCoor2D(Vector((float)x/(float)GraphicsEngine::getInstance()->getResolutionX(), 256 (float)y/(float)GraphicsEngine::getInstance()->getResolutionY(), 257 257 0 258 258 )); … … 269 269 void Element2D::shiftCoor2Dpx (int x, int y) 270 270 { 271 this->shiftCoor2D(Vector((float) GraphicsEngine::getInstance()->getResolutionX()/(float)x,272 (float)GraphicsEngine::getInstance()->getResolutionY()/(float)y,271 this->shiftCoor2D(Vector((float)x/(float)GraphicsEngine::getInstance()->getResolutionX(), 272 (float)y/(float)GraphicsEngine::getInstance()->getResolutionY(), 273 273 0)); 274 274 } … … 453 453 { 454 454 /* update the current absDirection - remember * means rotation around sth.*/ 455 this->prevRel Coordinate = this->relCoordinate;455 this->prevRelDirection = this->relDirection; 456 456 this->absDirection = this->relDirection + parent->getAbsDir2D();; 457 457 } … … 493 493 /* update the current absCoordinate */ 494 494 this->prevRelCoordinate = this->relCoordinate; 495 float sine = sin(this->parent->getAbsDir2D()); 496 float cose = cos(this->parent->getAbsDir2D()); 497 // this->absCoordinate.x = this->relCoordinate.x*cose - this->relCoordinate.y*sine + this->parent->getRelCoor2D().x*(1-cose) +this->parent->getRelCoor2D().y*sine; 498 // this->absCoordinate.y = this->relCoordinate.x*sine + this->relCoordinate.y*cose + this->parent->getRelCoor2D().y*(1-cose) +this->parent->getRelCoor2D().x*sine; 499 495 500 this->absCoordinate.x = this->parent->getAbsCoor2D().x + (this->relCoordinate.x*cos(this->parent->getAbsDir2D()) - this->relCoordinate.y * sin(this->parent->getAbsDir2D())); 496 501 this->absCoordinate.y = this->parent->getAbsCoor2D().y + (this->relCoordinate.x*sin(this->parent->getAbsDir2D()) + this->relCoordinate.y * cos(this->parent->getAbsDir2D())); -
trunk/src/lib/graphics/text_engine.cc
r5089 r5090 209 209 // glEnable(GL_TEXTURE_2D); 210 210 glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0); 211 // glRotatef(this->getAbsDir2D(), 0,0,1); 211 212 212 213 const char* tmpText = this->text; -
trunk/src/util/shell.cc
r5089 r5090 43 43 this->setBufferSize(100); 44 44 this->setBufferDisplaySize(10); 45 this->setAbsCoor2D(2, 400); 46 this->setAbsDir2D(0); 45 47 46 48 this->inputLineText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 255, 0, 0); … … 83 85 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/earth.ttf", this->textSize, TEXT_DYNAMIC, 255, 0, 0); 84 86 this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT); 85 this->bufferText[i]->setRelCoor2D(5, 400 +12*i);87 this->bufferText[i]->setRelCoor2D(5, 12*i); 86 88 this->bufferText[i]->setText(NULL); 87 89 this->bufferText[i]->setParent2D(this);
Note: See TracChangeset
for help on using the changeset viewer.