Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8518 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_style.cc


Ignore:
Timestamp:
Jun 16, 2006, 10:23:05 AM (19 years ago)
Author:
bensch
Message:

merged the gui back to the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_style.cc

    r8450 r8518  
    2929  GLGuiStyle::GLGuiStyle (const TiXmlElement* root)
    3030  {
     31    _font = NULL;
     32    this->reset();
     33
     34
    3135    if (root != NULL)
    3236      this->loadParams(root);
     
    4347  }
    4448
     49  void GLGuiStyle::reset()
     50  {
     51    this->setBorderLeft(1.0);
     52    this->setBorderRight(1.0);
     53    this->setBorderTop(1.0);
     54    this->setBorderBottom(1.0);
     55
     56    this->setTextSize(20.0);
     57    this->setBackgroundColor(1.0);
     58    this->setForegroundColor(1.0);
     59
     60    this->setFeaturePosition(FeatureLeft);
     61    this->setFont(NULL);
     62
     63    this->setAnimated(true);
     64    this->setAnimatedStateChanges(true);
     65  }
     66
    4567  void GLGuiStyle::loadParams(const TiXmlElement* root)
    46   {
    47   }
     68  {}
    4869
    4970  void GLGuiStyle::setBorderLeft(float value)
     
    5475
    5576  void GLGuiStyle::setBorderLeft(float value, OrxGui::State state)
    56 {}
     77  {
     78    _style[state]._borderLeft = value;
     79  }
    5780
    5881  void GLGuiStyle::setBorderLeftS(float value, const std::string& state)
    59   {}
     82  {
     83  }
    6084
    6185
     
    6791
    6892  void GLGuiStyle::setBorderRight(float value, OrxGui::State state)
    69 {}
     93  {
     94    _style[state]._borderRight = value;
     95  }
    7096
    7197  void GLGuiStyle::setBorderRightS(float value, const std::string& state)
     
    80106
    81107  void GLGuiStyle::setBorderTop(float value, OrxGui::State state)
    82 {}
     108  {
     109    _style[state]._borderTop = value;
     110  }
    83111
    84112  void GLGuiStyle::setBorderTopS(float value, const std::string& state)
     
    93121
    94122  void GLGuiStyle::setBorderBottom(float value, OrxGui::State state)
    95 {}
     123  {
     124    _style[state]._borderBottom = value;
     125  }
    96126
    97127  void GLGuiStyle::setBorderBottomS(float value, const std::string& state)
     
    106136
    107137  void GLGuiStyle::setTextSize(float value, OrxGui::State state)
    108 {}
     138  {
     139    _style[state]._textSize = value;
     140  }
    109141
    110142  void GLGuiStyle::setTextSizeS(float value, const std::string& state)
     
    119151
    120152  void GLGuiStyle::setBackgroundColor(const Color& color, OrxGui::State state)
    121 {}
     153  {
     154    _style[state]._backgroundColor = color;
     155  }
    122156
    123157  void GLGuiStyle::setBackgroundColorS(float r, float g, float b, float a, const std::string& state)
     
    132166
    133167  void GLGuiStyle::setBackgroundTexture(const Texture& texture, OrxGui::State state)
    134 {}
     168  {
     169    _style[state]._backgroundTexture = texture;
     170  }
    135171
    136172  void GLGuiStyle::setBackgroundTexture(const std::string& textureName, const std::string& state)
     
    145181
    146182  void GLGuiStyle::setForegroundColor(const Color& color, OrxGui::State state)
    147   {}
     183  {
     184    _style[state]._foregroundColor = color;
     185  }
    148186
    149187  void GLGuiStyle::setForegroundColorS(float r, float g, float b, float a, const std::string& state)
     
    158196
    159197  void GLGuiStyle::setFeaturePosition(const std::string& featurePosition)
    160   {
    161 
    162   }
     198  {}
    163199
    164200
     
    179215  }
    180216
    181   void GLGuiStyle::animatedStateChanges(bool animated)
     217  void GLGuiStyle::setAnimatedStateChanges(bool animated)
    182218  {
    183219    this->_animatedStateChanges = animated;
Note: See TracChangeset for help on using the changeset viewer.