Changeset 9869 in orxonox.OLD for trunk/src/story_entities/menu/game_menu.cc
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/menu/game_menu.cc
r9656 r9869 22 22 23 23 #include "state.h" 24 #include "class_list.h"25 24 26 25 #include "util/loading/load_param.h" 27 26 #include "util/loading/factory.h" 28 #include "util/loading/resource_manager.h"29 27 30 28 #include "graphics_engine.h" … … 41 39 #include "network_manager.h" 42 40 43 #include "preferences.h" 44 41 #include "parser/preferences/preferences.h" 42 43 #include "class_id_DEPRECATED.h" 45 44 //! This creates a Factory to fabricate a GameMenu 46 CREATE_FACTORY(GameMenu, CL_GAME_MENU);47 45 ObjectListDefinitionID(GameMenu, CL_GAME_MENU); 46 CREATE_FACTORY(GameMenu); 48 47 49 48 … … 51 50 : GameWorld() 52 51 { 53 this-> setClassID(CL_GAME_MENU, "GameMenu");52 this->registerObject(this, GameMenu::_objectList); 54 53 this->setName("GameMenu uninitialized"); 55 54 … … 191 190 image->setForegroundColor(Color( 1,1,1,.6)); 192 191 193 const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY);194 std::list<BaseObject*>::const_iterator it;195 192 bool first = true; 196 for( it = storyEntities->begin(); it != storyEntities->end(); it++) 193 for(ObjectList<StoryEntity>::const_iterator it = StoryEntity::objectList().begin(); 194 it != StoryEntity::objectList().end(); 195 ++it) 197 196 { 198 StoryEntity* se = dynamic_cast<StoryEntity*>(*it);197 StoryEntity* se = *it; 199 198 if( se->isContainedInMenu()) 200 199 { 201 200 202 printf("%s\n", se->getMenuScreenshoot().c_str());201 PRINTF(3)("Load image %s\n", se->getMenuScreenshoot().c_str()); 203 202 OrxGui::GLGuiImageButton* button = new OrxGui::GLGuiImageButton(se->getName(), se->getStoryID(), se->getMenuScreenshoot(), image); 204 203 button->startLevel.connect(this, &GameMenu::startLevel);
Note: See TracChangeset
for help on using the changeset viewer.