Changeset 6295 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_bar.cc
- Timestamp:
- Dec 26, 2005, 3:01:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_bar.cc
r6287 r6295 21 21 22 22 /** 23 * standard constructor23 * @brief standard constructor 24 24 */ 25 25 GLGuiBar::GLGuiBar () … … 31 31 32 32 /** 33 * standard deconstructor34 */33 * @brief standard deconstructor 34 */ 35 35 GLGuiBar::~GLGuiBar() 36 36 { … … 39 39 40 40 /** 41 * initializes the GUI-element41 * @brief initializes the GUI-element 42 42 */ 43 43 void GLGuiBar::init() 44 44 { 45 45 this->setClassID(CL_GLGUI_BAR, "GLGuiBar"); 46 47 this->frontMat.setDiffuse(1,0,0); 48 this->frontMat.setTransparency(.99); 49 50 this->setSize2D(50, 10); 46 51 47 52 this->value = 0.5f; … … 51 56 52 57 /** 53 * draws the GLGuiBar58 * @brief draws the GLGuiBar 54 59 */ 55 60 void GLGuiBar::draw() const 56 61 { 62 this->startDraw(); 57 63 58 printf("TEST %f %f\n", this->getAbsCoor2D().x, this->getAbsCoor2D().y);59 64 GLGuiWidget::draw(); 60 65 66 this->frontMat.select(); 61 67 glBegin(GL_QUADS); 62 68 63 glVertex2 d(.1, .1);64 glVertex2 d(.1, this->getSizeY2D()* .8* (value/maximum));65 glVertex2 d(this->getSizeX2D(), this->getSizeY2D() * .8* (value/maximum));66 glVertex2 d(this->getSizeX2D(), .1);69 glVertex2f(.1 * this->getSizeX2D(), .1 * this->getSizeY2D()); 70 glVertex2f(.1 * this->getSizeX2D(), this->getSizeY2D()* .9 * (value/maximum)); 71 glVertex2f(this->getSizeX2D() * .9, this->getSizeY2D() * .9 * (value/maximum)); 72 glVertex2f(this->getSizeX2D() * .9, .1 * this->getSizeY2D()); 67 73 68 74 glEnd(); 75 this->endDraw(); 69 76 }
Note: See TracChangeset
for help on using the changeset viewer.