Changeset 8594 in orxonox.OLD
- Timestamp:
- Jun 19, 2006, 11:58:03 PM (18 years ago)
- Location:
- branches/gui/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_style.cc
r8584 r8594 30 30 GLGuiStyle::GLGuiStyle (const TiXmlElement* root) 31 31 { 32 _font = NULL;32 this->_font = NULL; 33 33 this->_currentState = OrxGui::Normal; 34 34 this->_animationCycle = -1.0; … … 327 327 } 328 328 329 /** 330 * @brief sets the Background Texture to all States. 331 * @param textureName the Texture's fileName. 332 */ 333 void GLGuiStyle::setBackgroundTexture(const std::string& textureName) 334 { 335 for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) 336 _style[i]._background.setDiffuseMap(textureName); 337 } 338 329 339 /** 330 340 * @brief sets the Background Texture. … … 336 346 _style[state]._background.setDiffuseMap(texture); 337 347 } 348 338 349 339 350 … … 492 503 493 504 505 void GLGuiStyle::tick(float dt) 506 { 507 508 } 509 510 void GLGuiStyle::switchState(OrxGui::State state) 511 { 512 this->_currentStyle = this->_style[state]; 513 this->_currentState = state; 514 printf("Switching to state %s\n", OrxGui::StateString[state].c_str()); 515 } 516 517 494 518 /** 495 519 * @param stateName the Name of a State. -
branches/gui/src/lib/gui/gl/glgui_style.h
r8584 r8594 117 117 118 118 void setBackgroundTexture(const Texture& texture); 119 void setBackgroundTexture(const std::string& textureName); 119 120 void setBackgroundTexture(const Texture& texture, OrxGui::State state); 120 121 void setBackgroundTexture(const std::string& textureName, const std::string& stateName); -
branches/gui/src/lib/gui/gl/glgui_widget.cc
r8584 r8594 67 67 this->_pushed = false; 68 68 this->_state = OrxGui::Normal; 69 this->_toFrontColor = NULL; 70 71 this->style().setBackgroundColor(Color(0, 0, 0, 1)); 72 73 this->style().setForegroundColor(Color(1, 0, 0, 1), OrxGui::Normal); 74 this->style().setForegroundColor(Color(0, 1, 0, 1), OrxGui::Selected); 75 this->style().setForegroundColor(Color(0, 0, 1, 1), OrxGui::Focused); 76 this->style().setForegroundColor(Color(.1, .1, .1, 1), OrxGui::Insensitive); 69 77 70 78 this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE); 71 79 72 /* this->_backMat.setDiffuseColor(Color(1.0, 0.5, 0.4, 1.0)); 73 this->_backMat.setDiffuseMap("gui_element_background.png"); 74 this->_frontColor = Color(1.0, 0.0, 0.0);*/ 75 this->_toFrontColor = NULL; 80 this->style().setBackgroundTexture("gui_element_background.png"); 76 81 } 77 82 … … 115 120 return this->focusOverWidget(cursor->getAbsCoor2D()); 116 121 } 122 123 117 124 118 125 void GLGuiWidget::setFrontColor(const Color& frontColor, bool instantaniously) … … 164 171 void GLGuiWidget::clicking(const Vector2D& pos) 165 172 { 166 this->setFrontColor(Color(0, 0, 1)); 167 173 this->style().switchState(OrxGui::Selected); 168 174 } 169 175 170 176 void GLGuiWidget::releasing(const Vector2D& pos) 171 177 { 172 this->setFrontColor(Color(0,1,0)); 173 178 this->style().switchState(OrxGui::Normal); 174 179 } 175 180 176 181 void GLGuiWidget::receivedFocus() 177 182 { 178 this->s etFrontColor(Color(0, 1, 0));183 this->style().switchState(OrxGui::Focused); 179 184 } 180 185 181 186 void GLGuiWidget::removedFocus() 182 187 { 183 this->s etFrontColor(Color(1, 0, 0));188 this->style().switchState(OrxGui::Normal); 184 189 185 190 } -
branches/gui/src/lib/util/filesys/file.cc
r8333 r8594 205 205 206 206 /// FIXME NEXT THREE FUNCTIONS 207 bool File::isRead eable() const207 bool File::isReadable() const 208 208 { 209 209 #ifndef __WIN32__ -
branches/gui/src/lib/util/filesys/file.h
r8333 r8594 51 51 bool isFile() const; 52 52 bool isDirectory() const; 53 bool isRead eable() const;53 bool isReadable() const; 54 54 bool isWriteable() const; 55 55 bool isExecutable() const;
Note: See TracChangeset
for help on using the changeset viewer.