Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8651 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 1:07:45 AM (18 years ago)
Author:
bensch
Message:

gui: table drawn correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_table.cc

    r8650 r8651  
    4949    this->setClassID(CL_GLGUI_TABLE, "GLGuiTable");
    5050
     51    this->setBorderTop(10);
     52
    5153    this->setFocusable(true);
    5254    this->setClickable(true);
     55
    5356  }
    5457
     
    241244    glBegin(GL_LINES);
    242245
    243     glVertex2f(0, 0);
    244     glVertex2f(0, this->getSizeY2D());
     246    glVertex2f(columnPos, this->borderTop());
     247    glVertex2f(columnPos, this->getSizeY2D());
    245248    for (i = 0; i < this->columnCount(); ++i)
    246249    {
    247250      columnPos +=this->_columnWidths[i];
    248       glVertex2f(columnPos, 0);
     251      glVertex2f(columnPos, this->borderTop());
    249252      glVertex2f(columnPos, this->getSizeY2D());
    250253    }
    251254
    252     glVertex2f(0, 0);
    253     glVertex2f(this->getSizeX2D(), 0);
     255    glVertex2f(this->borderLeft(), rowPos);
     256    glVertex2f(this->getSizeX2D(), rowPos);
    254257    for (i = 0; i < this->rowCount(); ++i)
    255258    {
    256259      rowPos +=this->_rowHeights[i];
    257       glVertex2f(0, rowPos);
     260      glVertex2f(this->borderLeft(), rowPos);
    258261      glVertex2f(this->getSizeX2D(), rowPos);
    259262    }
     
    300303    for (i = fromLeft; i < this->columnCount(); ++i)
    301304    {
    302       this->_headers[i].setRelCoor2D(columnPos, 0);
     305      this->_headers[i].setRelCoor2D(columnPos, rowPos);
    303306
    304307      // not required, but a good idea :)
Note: See TracChangeset for help on using the changeset viewer.