Changeset 4856 in orxonox.OLD for orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
- Timestamp:
- Jul 14, 2005, 12:15:38 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
r4847 r4856 48 48 this->setClassID(CL_ELEMENT_2D, "Element2D"); 49 49 50 this->setPosition2D(0,0); 51 this->setAlignment(E2D_ALIGN_CENTER); 52 50 53 Render2D::getInstance()->registerElement2D(this); 51 52 54 } 53 55 … … 58 60 void Element2D::positioning() 59 61 { 60 // setting the Position of this ELEM2D. 61 if (this->bindNode) 62 63 // setting the Position of this 2D-Element. 64 if (this->alignment == E2D_ALIGN_SCREEN_CENTER) 65 { 66 absPos2D.x = GraphicsEngine::getInstance()->getResolutionX()/2 + this->relPos2D[0]; 67 absPos2D.y = GraphicsEngine::getInstance()->getResolutionY()/2 + this->relPos2D[1]; 68 absPos2D.depth = 0; 69 } 70 else if (this->bindNode) 62 71 { 63 72 GLdouble projectPos[3];
Note: See TracChangeset
for help on using the changeset viewer.