Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 1, 2006, 4:57:07 PM (18 years ago)
Author:
bensch
Message:

trunk: slerping colors in HSV-space works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/glgui_energywidget.cc

    r8985 r8986  
    4040    this->_bar.setBackgroundColor(Color(0,0,0,0));
    4141    this->_bar.setForegroundColor(Color(.5, .5, .5, 1));
    42     this->_bar.font().setBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
    4342  }
    4443
     
    7069
    7170    this->_bar.setValue(value);
    72     this->_bar.setForegroundColor(Color(1 - (value / this->_bar.getMaximum()), value / this->_bar.getMaximum(),0,1));
     71    this->_bar.setForegroundColor(Color::slerpHSVColor(Color::red, Color::green, value/this->_bar.maximum()));
    7372    this->_bar.setFrontColor(Color(1,1,1,1), true);
    7473    this->_valueText.setText(val.getString());
Note: See TracChangeset for help on using the changeset viewer.