- Timestamp:
- Jul 1, 2006, 4:23:49 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/glgui_bar.cc
r8983 r8984 70 70 71 71 this->_value = value; 72 73 this->_frontRect.setRight(this->getSizeX2D() * (_value -_minimum)/ (_minimum + _maximum));72 this->_frontRect.setSize((this->getSizeX2D() - borderLeft() - borderRight()) * (_value -_minimum)/ (_minimum + _maximum) 73 ,this->getSizeY2D() - borderTop() - borderBottom()); 74 74 } 75 75 void GLGuiBar::setMinimum(float minimum) … … 97 97 } 98 98 99 void GLGuiBar::updateFrontColor()100 {101 this->font().setDiffuseColor(Color());102 }103 104 105 99 106 100 /** … … 112 106 GLGuiWidget::draw(); 113 107 114 this->font().select(); 115 glDisable(GL_BLEND); 108 this->foreground().select(); 116 109 this->drawRect(this->_frontRect); 117 110 -
trunk/src/lib/gui/gl/glgui_bar.h
r8983 r8984 40 40 protected: 41 41 virtual void resize(); 42 virtual void updateFrontColor();43 42 44 43 private: -
trunk/src/world_entities/elements/glgui_energywidget.cc
r8983 r8984 39 39 this->_bar.setBackgroundTexture(Texture()); 40 40 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)); 42 42 this->_bar.font().setBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); 43 43 } … … 68 68 val.setType(MT_INT); 69 69 70 70 71 this->_bar.setValue(value); 72 this->_bar.setForegroundColor(Color(1 - (value / this->_bar.getMaximum()), value / this->_bar.getMaximum(),0,1)); 71 73 this->_valueText.setText(val.getString()); 72 74 } -
trunk/src/world_entities/weapons/test_gun.cc
r8983 r8984 120 120 this->setStateDuration(WS_DEACTIVATING, .4); 121 121 122 this->setEnergyMax(1000 0);122 this->setEnergyMax(1000); 123 123 this->increaseEnergy(1000); 124 124 //this->minCharge = 2;
Note: See TracChangeset
for help on using the changeset viewer.