Changeset 5420 in orxonox.OLD for trunk/src/lib/gui/gl_gui
- Timestamp:
- Oct 22, 2005, 1:57:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
r5418 r5420 19 19 20 20 #include "text.h" 21 #include "material.h" 21 22 22 23 using namespace std; … … 45 46 { 46 47 this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton"); 48 // this->label->setRelCoor2D(10, 10); 47 49 50 this->backMat = new Material(); 51 this->backMat->setDiffuse(0, 0, 0); 52 53 this->setSize2D(label->getSizeX2D()+10, label->getSizeY2D()+10); 48 54 } 49 55 … … 53 59 void GLGuiPushButton::draw() const 54 60 { 55 this->label->draw(); 61 this->backMat->select(); 62 glPushMatrix(); 63 glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); 64 glBegin(GL_QUADS); 65 66 glVertex2d(0,0); 67 glVertex2d(0, this->getSizeY2D()); 68 glVertex2d(this->getSizeX2D(), this->getSizeY2D()); 69 glVertex2d(this->getSizeX2D(),0); 70 71 glEnd(); 72 glPopMatrix(); 73 74 // this->label->draw(); 56 75 // printf("test"); 57 76 }
Note: See TracChangeset
for help on using the changeset viewer.