Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8035 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc


Ignore:
Timestamp:
May 31, 2006, 4:20:51 PM (18 years ago)
Author:
bensch
Message:

gui: merged the gui back to the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc

    r7919 r8035  
    4747    this->label.setRelCoor2D(5, 5);
    4848    this->setSize2D(this->label.getSizeX2D() + 10, this->label.getSizeY2D() + 10);
     49
     50    GLGuiWidget::resize();
     51    this->frontRect().setTopLeft(1, 1);
     52    this->frontRect().setSize(this->getSizeX2D() -2, this->getSizeY2D() -2);
    4953  }
    5054
     
    7074  }
    7175
    72   void GLGuiPushButton::clicked()
     76  void GLGuiPushButton::clicking(const Vector2D& pos)
    7377  {
    7478    printf("%s clicked\n", this->getLabel().c_str());
    75     GLGuiWidget::clicked();
     79    GLGuiButton::clicking(pos);
    7680  }
    7781
    7882
    79   void GLGuiPushButton::released()
     83  void GLGuiPushButton::releasing(const Vector2D& pos)
    8084  {
    8185    printf("%s released\n", this->getLabel().c_str());
    82     GLGuiWidget::released();
     86    GLGuiButton::releasing(pos);
    8387  }
    8488
     
    9094  void GLGuiPushButton::draw() const
    9195  {
    92     this->startDraw();
     96    this->beginDraw();
    9397    GLGuiButton::draw();
    9498
    9599    this->frontMaterial().select();
    96     glBegin(GL_QUADS);
    97 
    98     glTexCoord2i(0,0); glVertex2d(1, 1);
    99     glTexCoord2i(0,1); glVertex2d(1, this->getSizeY2D() - 1);
    100     glTexCoord2i(1,1); glVertex2d(this->getSizeX2D() - 1, this->getSizeY2D() -1);
    101     glTexCoord2i(1,0); glVertex2d(this->getSizeX2D() - 1, 1);
    102 
    103     glEnd();
     100    this->drawRect(this->frontRect());
    104101    this->endDraw();
    105102    //   this->label->draw();
Note: See TracChangeset for help on using the changeset viewer.