Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 14, 2005, 12:15:38 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: text renders as good as before, but now as Element2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/render2D/element_2d.cc

    r4847 r4856  
    4848  this->setClassID(CL_ELEMENT_2D, "Element2D");
    4949
     50  this->setPosition2D(0,0);
     51  this->setAlignment(E2D_ALIGN_CENTER);
     52
    5053  Render2D::getInstance()->registerElement2D(this);
    51 
    5254}
    5355
     
    5860void Element2D::positioning()
    5961{
    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)
    6271  {
    6372    GLdouble projectPos[3];
Note: See TracChangeset for help on using the changeset viewer.