Changeset 8582 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jun 19, 2006, 12:35:13 PM (18 years ago)
- Location:
- branches/gui/src/lib/gui/gl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_style.cc
r8575 r8582 83 83 LoadParam(root, "background-color", this, GLGuiStyle, setBackgroundColorS); 84 84 LoadParam(root, "foreground-color", this, GLGuiStyle, setForegroundColorS); 85 86 // LoadParamXML(root, "backmat", this, GLGuiStyle, loadBackgroundMaterial); 87 // LoadParamXML(root, "frontmat", this, GLGuiStyle, loadForegroundMaterial); 85 88 86 89 LoadParam(root, "feature-position", this, GLGuiStyle, setFeaturePositionS); … … 323 326 } 324 327 328 325 329 /** 326 330 * @brief sets the Background Texture. … … 374 378 this->setForegroundColor(Color(r,g,b,a)); 375 379 } 380 381 382 void GLGuiStyle::loadBackgroundMaterial(const Material& material) 383 { 384 for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) 385 this->loadForegroundMaterial(material, (OrxGui::State)i); 386 } 387 388 void GLGuiStyle::loadBackgroundMaterial(const Material& material, OrxGui::State state) 389 { 390 this->_style[state]._background = material; 391 } 392 393 void GLGuiStyle::loadBackgroundMaterial(const TiXmlElement* element) 394 { 395 for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) 396 this->_style[i]._background.loadParams(element); 397 } 398 399 void GLGuiStyle::loadBackgroundMaterial(const TiXmlElement* element, OrxGui::State state) 400 { 401 this->_style[state]._background.loadParams(element); 402 } 403 void GLGuiStyle::loadBackgroundMaterialS(const TiXmlElement* element, const std::string& stateName) 404 { 405 OrxGui::State state; 406 if (getState(stateName, &state)) 407 this->loadBackgroundMaterial(element, state); 408 else 409 this->loadBackgroundMaterial(element); 410 } 411 412 void GLGuiStyle::loadForegroundMaterial(const Material& material) 413 {} 414 void GLGuiStyle::loadForegroundMaterial(const Material& material, OrxGui::State state) 415 {} 416 void GLGuiStyle::loadForegroundMaterial(const TiXmlElement* element, OrxGui::State state) 417 {} 418 void GLGuiStyle::loadForegroundMaterialS(const TiXmlElement* element, const std::string& stateName) 419 {} 376 420 377 421 -
branches/gui/src/lib/gui/gl/glgui_style.h
r8575 r8582 92 92 void setForegroundColorS(float r, float g, float b, float a, const std::string& stateName); 93 93 94 void loadBackgroundMaterial(const Material& material); 95 void loadBackgroundMaterial(const Material& material, OrxGui::State state); 96 void loadBackgroundMaterial(const TiXmlElement* element); 97 void loadBackgroundMaterial(const TiXmlElement* element, OrxGui::State state); 98 void loadBackgroundMaterialS(const TiXmlElement* element, const std::string& stateName); 99 100 void loadForegroundMaterial(const Material& material); 101 void loadForegroundMaterial(const Material& material, OrxGui::State state); 102 void loadForegroundMaterial(const TiXmlElement* element, OrxGui::State state); 103 void loadForegroundMaterialS(const TiXmlElement* element, const std::string& stateName); 94 104 95 105 void setFeaturePosition(FeaturePosition featurePosition); … … 102 112 void setAnimatedStateChanges(bool animated); 103 113 104 105 114 private: 115 bool getState(const std::string& stateName, OrxGui::State* state); 106 116 107 117 private:
Note: See TracChangeset
for help on using the changeset viewer.