Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10225 in orxonox.OLD for branches/gui/src/lib


Ignore:
Timestamp:
Jan 10, 2007, 5:59:05 PM (18 years ago)
Author:
patrick
Message:

texture problem solved, now all backgrounds are shown

File:
1 edited

Legend:

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

    r10223 r10225  
    112112
    113113
    114 
    115     this->setBackgroundColor(Color(0, 0, 0, 0.5));
     114    this->setBackgroundColor(Color(0, 0, 0, 0.0));
    116115    this->setBackgroundColor(Color(0, 0, 0, 0), OrxGui::Selected);
    117116
    118117
    119     this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    120     this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    121     this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    122     this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
     118    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     119    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     120    this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     121    this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    123122
    124123    this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal);
     
    572571  void GLGuiWidget::setBackgroundTexture(const std::string& textureName)
    573572  {
    574     for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
     573    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) {
    575574      _style[i]._background.setDiffuseMap(textureName);
     575      _style[i]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     576    }
    576577    this->_currentStyle._background.setDiffuseMap(textureName);
     578    this->_currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
    577579  }
    578580
     
    585587  {
    586588    _style[state]._background.setDiffuseMap(texture);
    587     if (state == _state)
     589    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     590
     591    if (state == _state) {
    588592      _currentStyle._background.setDiffuseMap(texture);
     593      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     594    }
    589595  }
    590596
Note: See TracChangeset for help on using the changeset viewer.