Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

orxonox/trunk: gui with fading :)

File:
1 edited

Legend:

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

    r8983 r8984  
    3939    this->_bar.setBackgroundTexture(Texture());
    4040    this->_bar.setBackgroundColor(Color(0,0,0,0));
    41     this->_bar.setForegroundColor(Color(1, 1, 1, 1));
     41    this->_bar.setForegroundColor(Color(.5, .5, .5, 1));
    4242    this->_bar.font().setBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
    4343  }
     
    6868    val.setType(MT_INT);
    6969
     70
    7071    this->_bar.setValue(value);
     72    this->_bar.setForegroundColor(Color(1 - (value / this->_bar.getMaximum()), value / this->_bar.getMaximum(),0,1));
    7173    this->_valueText.setText(val.getString());
    7274  }
Note: See TracChangeset for help on using the changeset viewer.