Changeset 7062 in orxonox.OLD for trunk/src/lib/gui
- Timestamp:
- Feb 6, 2006, 9:55:04 PM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_bar.cc
r6305 r7062 45 45 this->setClassID(CL_GLGUI_BAR, "GLGuiBar"); 46 46 47 this->frontMat.setDiffuse(1,0,0); 48 this->frontMat.setTransparency(.99); 47 this->frontMat.setDiffuse(1,1,1); 49 48 50 49 this->setSize2D(50, 10); … … 67 66 glBegin(GL_QUADS); 68 67 68 glTexCoord2i(0,0); 69 69 glVertex2f(3.0, 3.0); 70 glTexCoord2i(0,1); 70 71 glVertex2f(3.0, (this->getSizeY2D()-3.0)* (value/maximum)); 72 glTexCoord2i(1,1); 71 73 glVertex2f(this->getSizeX2D()-3.0, (this->getSizeY2D()-3.0) * (value/maximum)); 74 glTexCoord2i(1,0); 72 75 glVertex2f(this->getSizeX2D()-3.0, 3.0); 73 76 -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r6431 r7062 54 54 // this->setParent2D((Element2D*)NULL); 55 55 56 this->backMat.setDiffuse(.1, .5, .5); 57 this->backMat.setTransparency(.9); 56 this->backMat.setDiffuse(1.0, 1.0, 1.0); 58 57 59 58 this->frontModel = 0; … … 118 117 119 118 glBegin(GL_QUADS); 120 gl Vertex2d(0, 0);121 gl Vertex2d(0, this->getSizeY2D());122 gl Vertex2d(this->getSizeX2D(), this->getSizeY2D());123 gl Vertex2d(this->getSizeX2D(), 0);119 glTexCoord2i(0,1); glVertex2d(0, 0); 120 glTexCoord2i(0,0); glVertex2d(0, this->getSizeY2D()); 121 glTexCoord2i(1,0); glVertex2d(this->getSizeX2D(), this->getSizeY2D()); 122 glTexCoord2i(1,1); glVertex2d(this->getSizeX2D(), 0); 124 123 glEnd(); 125 124 } -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r6438 r7062 66 66 virtual void draw() const; 67 67 68 Material& backMaterial() { return this->backMat; }; 69 Material& frontMaterial() { return this->frontMat; }; 70 68 71 protected: 69 72 inline void startDraw() const { glPushMatrix(); glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); };
Note: See TracChangeset
for help on using the changeset viewer.