- Timestamp:
- Oct 18, 2005, 7:18:26 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.h
r5398 r5399 27 27 28 28 E2D_LAYER_COUNT = 4, //!< The count of Layers. 29 30 E2D_LAYER_EXTERN = -1, //!< In a Layers handeled externally. 29 31 30 32 E2D_LAYER_ALL = 5, -
trunk/src/lib/graphics/render2D/render_2d.cc
r5398 r5399 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 66 66 void Render2D::registerElement2D(Element2D* element2D) 67 67 { 68 if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT )68 if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN) 69 69 this->element2DList[element2D->getLayer()]->add(element2D); 70 70 // DEBUG printf("::::%p, %d %d \n", element2D, element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize()); … … 80 80 void Render2D::unregisterElement2D(Element2D* element2D) 81 81 { 82 if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT )82 if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN) 83 83 this->element2DList[element2D->getLayer()]->remove(element2D); 84 84 // DEBUG printf(":::%s layer: %d, %d\n", element2D->getClassName(), element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize()); … … 100 100 if (likely(element2D->getLayer() != to)) 101 101 { 102 this->element2DList[element2D->getLayer()]->remove(element2D); 103 this->element2DList[to]->add(element2D); 102 if (element2D->getLayer() != E2D_LAYER_EXTERN) 103 this->element2DList[element2D->getLayer()]->remove(element2D); 104 if (to != E2D_LAYER_EXTERN) 105 this->element2DList[to]->add(element2D); 104 106 } 105 107 } … … 136 138 if (layer != E2D_LAYER_ALL) 137 139 { 138 if (likely( this->element2DList[layer]->getSize() > 0))140 if (likely(layer != E2D_LAYER_EXTERN && this->element2DList[layer]->getSize() > 0)) 139 141 { 140 142 tIterator<Element2D>* iterator = this->element2DList[layer]->getIterator(); … … 169 171 GraphicsEngine::leave2DMode(); 170 172 } 173 174 -
trunk/src/lib/gui/gl_gui/glgui_button.cc
r5395 r5399 52 52 this->label = new Text(); 53 53 this->label->setParent2D(this); 54 this->label->setLayer(E2D_LAYER_EXTERN); 54 55 } 55 56 -
trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
r5397 r5399 54 54 { 55 55 this->label->draw(); 56 printf("test"); 56 57 } 57 58 -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5397 r5399 51 51 this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE); 52 52 this->setParent2D((Element2D*)NULL); 53 this->setLayer(E2D_LAYER_EXTERN); 53 54 54 55 this->backMat = NULL;
Note: See TracChangeset
for help on using the changeset viewer.