Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

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

Location:
trunk/src/lib/gui/gl
Files:
3 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  }
  • trunk/src/lib/gui/gl/glgui_bar.h

    r8145 r8972  
    3737    virtual void draw() const;
    3838
     39  protected:
     40    virtual void resize();
     41
    3942  private:
    4043    void init();
  • trunk/src/lib/gui/gl/glgui_text.h

    r8145 r8972  
    99
    1010#include "glgui_widget.h"
    11 
     11#include "text.h"
    1212// FORWARD DECLARATION
    13 class Text;
    1413namespace OrxGui
    1514{
     
    1918   *
    2019   */
    21   class GLGuiText : public GLWidget
     20  class GLGuiText : public GLGuiWidget
    2221  {
    2322
     
    3534
    3635  private:
    37     Text*             text;
     36    Text              text;
    3837  };
    3938}
Note: See TracChangeset for help on using the changeset viewer.