Changeset 9869 in orxonox.OLD for trunk/src/story_entities/menu
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- Location:
- trunk/src/story_entities/menu
- Files:
-
- 3 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); -
trunk/src/story_entities/menu/game_menu.h
r9406 r9869 22 22 class GameMenu : virtual public GameWorld, virtual public EventListener 23 23 { 24 24 ObjectListDeclaration(GameMenu); 25 25 public: 26 26 GameMenu(const TiXmlElement* root = NULL); … … 45 45 void showMultiPlayer(); 46 46 void showOptionsMenu(); 47 47 48 48 void showClientMenu(); 49 49 void connectToServer(); 50 50 51 51 void showServerMenu(); 52 52 void createMasterServer(); … … 69 69 void setSelectorSound(const std::string& selectorSound); 70 70 71 71 72 72 73 73 … … 76 76 OrxGui::GLGuiBox* levelsBox; 77 77 OrxGui::GLGuiBox* networkBox; 78 78 79 79 OrxGui::GLGuiBox* clientNetworkBox; 80 80 OrxGui::GLGuiInputLine* ipInputLine; 81 81 82 82 OrxGui::GLGuiBox* serverNetworkBox; 83 83 -
trunk/src/story_entities/menu/glgui_imagebutton.cc
r9406 r9869 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL17 16 18 17 #include "glgui_imagebutton.h" … … 45 44 void GLGuiImageButton::receivedFocus() 46 45 { 47 printf("%s:: %s\n", this->label().c_str(), this->imageName.c_str());46 PRINTF(4)("%s:: %s\n", this->label().c_str(), this->imageName.c_str()); 48 47 49 48 this->image->loadImageFromFile(this->imageName);
Note: See TracChangeset
for help on using the changeset viewer.