Changeset 5387 in orxonox.OLD for trunk/src/lib/gui
- Timestamp:
- Oct 16, 2005, 12:42:16 AM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_container.cc
r5364 r5387 52 52 void GLGuiContainer::showAll() 53 53 { 54 55 54 tIterator<GLGuiWidget>* itC = this->children->getIterator(); 56 55 GLGuiWidget* enumC = itC->firstElement(); … … 60 59 static_cast<GLGuiContainer*>(enumC)->showAll(); 61 60 else 62 enumC->show();61 enumC->show(); 63 62 enumC = itC->nextElement(); 64 63 } … … 71 70 void GLGuiContainer::hideAll() 72 71 { 72 tIterator<GLGuiWidget>* itC = this->children->getIterator(); 73 GLGuiWidget* enumC = itC->firstElement(); 74 while (enumC != NULL) 75 { 76 if (enumC->isA(CL_GLGUI_CONTAINER)) 77 static_cast<GLGuiContainer*>(enumC)->showAll(); 78 else 79 enumC->hide(); 80 enumC = itC->nextElement(); 81 } 82 delete itC; 73 83 84 this->hide(); 74 85 } 75 86 -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5384 r5387 26 26 { 27 27 this->init(); 28 this->setVisibility( true);28 this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE); 29 29 } 30 30 … … 46 46 this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget"); 47 47 48 this->managed = false;49 48 this->focusable = true; 50 49 this->clickable = true; 51 50 52 this->backGround = NULL; 53 this->renderModel = 0; 51 this->backMat = NULL; 52 this->backModel = 0; 53 this->frontMat = NULL; 54 this->frontModel = 0; 54 55 } -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r5384 r5387 13 13 class Material; 14 14 15 //! if the Element should be visible by default. 16 #define GLGUI_WIDGET_DEFAULT_VISIBLE false 17 15 18 //! This is widget part of the openglGUI class 16 19 /** 17 * A widget is the main class of all the elements of th GUI.18 */20 * A widget is the main class of all the elements of th GUI. 21 */ 19 22 class GLGuiWidget : public Element2D { 20 23 public: … … 31 34 32 35 protected: 33 Material* backGround; 34 GLuint renderModel; 36 Material* backMat; 37 GLuint backModel; 38 39 Material* frontMat; 40 GLuint frontModel; 35 41 36 42 private: 37 bool managed; //!< if this GUI-element should be managed. true means it gets deleted with the deletion of it's parent. 38 bool focusable; //!< If it can receive focus. 39 bool clickable; //!< if it can be clicked upon. 43 bool focusable; //!< If this widget can receive focus. 44 bool clickable; //!< if this widget can be clicked upon. 40 45 }; 41 46
Note: See TracChangeset
for help on using the changeset viewer.