- Timestamp:
- Jan 30, 2006, 2:56:54 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.h
r6841 r6848 114 114 inline void setVisibility(bool visible) { this->bVisible = visible; }; 115 115 /** @returns the visibility state */ 116 inline bool isVisible() { return this->bVisible; };116 inline bool isVisible() const { return this->bVisible; }; 117 117 118 118 -
trunk/src/story_entities/simple_game_menu.cc
r6845 r6848 190 190 PRINTF(0)("Got a new menu entry |%s|\n", se->getName()); 191 191 ImageEntity* ie = new ImageEntity(); 192 ie->setAbsCoor(0.0f, this->menuLayer[1]->menuList.size() * -10.0f, 0.0f); 193 //State::getObjectManager()->toList(dynamic_cast<WorldEntity*>(ie), OM_DEAD); 194 //this->menuLayer[1]->menuList.push_back(ie); 192 ie->setTexture(se->getMenuItemImage()); 193 ie->setRelCoor(0.0f,- (this->menuLayer[1]->menuList.size() * 10.0f), 0.0f); 194 ie->setVisibility(false); 195 this->menuLayer[1]->menuList.push_back(ie); 195 196 } 196 197 } … … 306 307 else if( this->layerIndex == 1) 307 308 { 308 309 if( event.type == SDLK_RETURN && event.bPressed == true) 310 { 311 this->setNextStoryID( this->menuLayer[1]->storyList[this->menuSelectedIndex]->getStoryID()); 312 this->stop(); 313 } 309 314 } 310 315 } … … 328 333 for( it = this->menuLayer[layer1]->menuList.begin(); it != this->menuLayer[layer1]->menuList.end(); it++ ) 329 334 { 330 (*it)->set AbsCoor(Vector(-100, -100, -100));335 (*it)->setVisibility(false); 331 336 } 332 337 … … 335 340 // beam here the new menu 336 341 for( it = this->menuLayer[layer2]->menuList.begin(); it != this->menuLayer[layer2]->menuList.end(); it++ ) 337 {} 342 { 343 (*it)->setVisibility(true); 344 } 338 345 339 346 this->layerIndex = layer2; -
trunk/src/story_entities/story_entity.cc
r6841 r6848 41 41 this->storyID = -1; 42 42 this->description = NULL; 43 this->menuItemImage = "pictures/menu/DefaultMenuItem.png"; 43 44 this->nextStoryID = WORLD_ID_GAMEEND; 44 45 this->bMenuEntry = false; -
trunk/src/world_entities/image_entity.cc
r6841 r6848 161 161 void ImageEntity::draw() const 162 162 { 163 if( !this->isVisible()) 164 return; 165 163 166 glPushMatrix(); 164 167 glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
Note: See TracChangeset
for help on using the changeset viewer.