Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8972 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_bar.cc


Ignore:
Timestamp:
Jul 1, 2006, 11:26:00 AM (19 years ago)
Author:
bensch
Message:

added glgui_energywidget, the new Widget to display Energy and a Value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_bar.cc

    r8448 r8972  
    5555  }
    5656
     57  void GLGuiBar::resize()
     58  {
     59    GLGuiWidget::resize();
     60
     61
     62  }
     63
     64
    5765  /**
    5866   * @brief draws the GLGuiBar
     
    6068  void GLGuiBar::draw() const
    6169  {
     70    printf("BAR\n");
    6271    this->beginDraw();
    63 
    6472    GLGuiWidget::draw();
    6573
    66     //this->frontMaterial().select();
    67     glBegin(GL_QUADS);
    68 
    69     glTexCoord2f(0,0);
    70     glVertex2f(3.0, 3.0);
    71     glTexCoord2f(0, value/maximum);
    72     glVertex2f(3.0, (this->getSizeY2D()-3.0)* (value/maximum));
    73     glTexCoord2f(1, value/maximum);
    74     glVertex2f(this->getSizeX2D()-3.0, (this->getSizeY2D()-3.0) * (value/maximum));
    75     glTexCoord2f(1,0);
    76     glVertex2f(this->getSizeX2D()-3.0, 3.0);
    77 
    78     glEnd();
    7974    this->endDraw();
    8075  }
Note: See TracChangeset for help on using the changeset viewer.