Changeset 8035 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
- Timestamp:
- May 31, 2006, 4:20:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
r7919 r8035 47 47 this->label.setRelCoor2D(5, 5); 48 48 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); 49 53 } 50 54 … … 70 74 } 71 75 72 void GLGuiPushButton::click ed()76 void GLGuiPushButton::clicking(const Vector2D& pos) 73 77 { 74 78 printf("%s clicked\n", this->getLabel().c_str()); 75 GLGui Widget::clicked();79 GLGuiButton::clicking(pos); 76 80 } 77 81 78 82 79 void GLGuiPushButton::releas ed()83 void GLGuiPushButton::releasing(const Vector2D& pos) 80 84 { 81 85 printf("%s released\n", this->getLabel().c_str()); 82 GLGui Widget::released();86 GLGuiButton::releasing(pos); 83 87 } 84 88 … … 90 94 void GLGuiPushButton::draw() const 91 95 { 92 this-> startDraw();96 this->beginDraw(); 93 97 GLGuiButton::draw(); 94 98 95 99 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()); 104 101 this->endDraw(); 105 102 // this->label->draw();
Note: See TracChangeset
for help on using the changeset viewer.