Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10374 in orxonox.OLD for trunk/src/lib/gui/gl


Ignore:
Timestamp:
Jan 25, 2007, 11:27:47 PM (18 years ago)
Author:
patrick
Message:

merged branche gui

Location:
trunk/src/lib/gui/gl
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/Makefile.am

    r9656 r10374  
    2525                glgui_frame.cc \
    2626                glgui_text.cc \
     27                glgui_multiline_text.cc \
    2728                glgui_inputline.cc \
    2829                glgui_textfield.cc \
     
    5354                glgui_frame.h \
    5455                glgui_text.h \
     56                glgui_multiline_text.h \
    5557                glgui_inputline.h \
    5658                glgui_textfield.h \
  • trunk/src/lib/gui/gl/glgui_text.cc

    r9869 r10374  
    5050    this->_text.setFont("fonts/final_frontier.ttf", 20);
    5151    this->_text.setLineWidth(400);
    52     this->_text.setDotsPosition(LimitedWidthText::Begin);
     52//     this->_text.setDotsPosition(LimitedWidthText::Begin);
    5353    this->_text.setColor(foregroundColor());
    5454    this->_text.setVisibility(false);
  • trunk/src/lib/gui/gl/glgui_widget.cc

    r10368 r10374  
    112112
    113113
    114     this->setBackgroundColor(Color(.51, .3, .3, .5));
    115     this->setBackgroundColor(Color(.3, .5, .3, 1), OrxGui::Selected);
    116     this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    117     this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    118     this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    119     this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     114    this->setBackgroundColor(Color(0, 0, 0, 0));
     115    this->setBackgroundColor(Color(0, 0, 0, 0), OrxGui::Selected);
     116
     117
     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);
    120122
    121123    this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal);
     
    563565  }
    564566
     567 
     568 
     569 
     570 
     571 
    565572  /**
    566573  * @brief sets the Background Texture to all States.
     
    569576  void GLGuiWidget::setBackgroundTexture(const std::string& textureName)
    570577  {
    571     for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
     578    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) {
    572579      _style[i]._background.setDiffuseMap(textureName);
     580      _style[i]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     581    }
    573582    this->_currentStyle._background.setDiffuseMap(textureName);
    574   }
    575 
     583    this->_currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     584  }
     585
     586  void GLGuiWidget::setBackgroundTexture(const std::string& textureName, OrxGui::State state)
     587  {
     588    _style[state]._background.setDiffuseMap(textureName);
     589    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     590
     591    if (state == _state) {
     592      _currentStyle._background.setDiffuseMap(textureName);
     593      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     594    }
     595  }
     596 
     597 
     598 
     599 
    576600  /**
    577601   * @brief sets the Background Texture.
     
    582606  {
    583607    _style[state]._background.setDiffuseMap(texture);
    584     if (state == _state)
     608    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     609
     610    if (state == _state) {
    585611      _currentStyle._background.setDiffuseMap(texture);
     612      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     613    }
    586614  }
    587615
  • trunk/src/lib/gui/gl/glgui_widget.h

    r10368 r10374  
    181181    void setBackgroundTexture(const std::string& textureName);
    182182    void setBackgroundTexture(const Texture& texture, OrxGui::State state);
     183    void setBackgroundTexture(const std::string& textureName, OrxGui::State state);
    183184    void setBackgroundTexture(const std::string& textureName, const std::string& stateName);
    184185
Note: See TracChangeset for help on using the changeset viewer.