Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8004 in orxonox.OLD for branches/gui/src/lib


Ignore:
Timestamp:
May 31, 2006, 12:35:02 AM (19 years ago)
Author:
bensch
Message:

gui: box works pretty good now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl_gui/glgui_box.cc

    r8003 r8004  
    103103  void GLGuiBox::resize()
    104104  {
    105     float height = 0.0f;
     105    float height = this->borderSize();
    106106    float width = 0.0f;
    107107    std::vector<GLGuiWidget*>::iterator widget;
     
    110110    for (widget = this->children.begin(); widget != this->children.end(); ++widget)
    111111    {
    112       (*widget)->setAbsCoor2D(0, height);
     112      (*widget)->setRelCoor2D(this->borderSize(), height);
    113113      height += (*widget)->getSizeY2D();
    114114      width = fmax(width, (*widget)->getSizeX2D());
    115115    }
    116116
     117    width += this->borderSize() * 2.0;
     118    height += this->borderSize(); /* *2 done further up */
     119
     120    printf("%f %f\n", width, height);
     121    this->setSize2D(width, height);
    117122    GLGuiWidget::resize();
    118123    // resize everything.
Note: See TracChangeset for help on using the changeset viewer.