Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8437 in orxonox.OLD


Ignore:
Timestamp:
Jun 15, 2006, 1:30:18 AM (18 years ago)
Author:
bensch
Message:

gui: Coloring-sceme much improved

Location:
branches/gui/src/lib/gui/gl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_button.cc

    r8435 r8437  
    5555
    5656    this->_label.setFont("fonts/final_frontier.ttf", 20);
    57     this->setFrontColor(Color(1, 0, 0, 1.0));
     57    this->_label.setColor(this->frontColor());
    5858
    5959    this->_label.setParent2D(this);
  • branches/gui/src/lib/gui/gl/glgui_inputline.cc

    r8435 r8437  
    5151    this->_text.setRelCoor2D(4,4);
    5252    this->_text.setFont("fonts/final_frontier.ttf", 20);
     53    this->_text.setColor(this->frontColor());
    5354    this->_text.setVisibility(false);
    5455    this->resize();
  • branches/gui/src/lib/gui/gl/glgui_slider.cc

    r8421 r8437  
    228228  void GLGuiSlider::tick(float dt)
    229229  {
     230    GLGuiWidget::tick(dt);
    230231  }
    231232
  • branches/gui/src/lib/gui/gl/glgui_widget.cc

    r8435 r8437  
    6969    this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
    7070
    71     this->_backMat.setDiffuse(1.0, 0.5, 0.4);
     71    this->_backMat.setDiffuseColor(Color(1.0, 0.5, 0.4, 1.0));
    7272    this->_backMat.setDiffuseMap("gui_element_background.png");
    73     this->_frontColor.setColor(1.0, 0.0, 0.0);
    74     _toFrontColor = NULL;
     73    this->_frontColor = Color(1.0, 0.0, 0.0);
     74    this->_toFrontColor = NULL;
    7575
    7676
     
    121121  }
    122122
    123   void GLGuiWidget::setFrontColor(const Color& frontColor)
    124   {
    125     if (!this->_toFrontColor)
     123  void GLGuiWidget::setFrontColor(const Color& frontColor, bool instantaniously)
     124  {
     125    if (instantaniously)
     126    {
     127      this->_frontColor = frontColor;
     128      if (this->_toFrontColor != NULL)
     129      {
     130        delete this->_toFrontColor;
     131        this->_toFrontColor = NULL;
     132      }
     133    }
     134    else if (!this->_toFrontColor)
    126135      this->_toFrontColor = new Color(frontColor);
    127136    else
     
    214223
    215224  void GLGuiWidget::destroyed()
    216   {
    217   };
     225  {}
     226  ;
    218227
    219228
  • branches/gui/src/lib/gui/gl/glgui_widget.h

    r8435 r8437  
    9292    const Rect2D& backRect() const { return this->_backRect; };
    9393
    94     void setFrontColor(const Color& frontColor);
     94    void setFrontColor(const Color& frontColor, bool instantaniously = false);
    9595    const Color& frontColor() const { return this->_frontColor; };
    9696
Note: See TracChangeset for help on using the changeset viewer.