diff options
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index affb885..5c5c928 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -13,6 +13,7 @@ #include "dialogues/ConfirmPrompt.h" #include "GameModelException.h" #include "simulation/Air.h" +#include "elementsearch/ElementSearchActivity.h" #include "update/UpdateActivity.h" #include "Notification.h" @@ -513,6 +514,21 @@ void GameController::OpenLogin() ui::Engine::Ref().ShowWindow(loginWindow->GetView()); } +void GameController::OpenElementSearch() +{ + vector<Tool*> toolList; + vector<Menu*> menuList = gameModel->GetMenuList(); + for(std::vector<Menu*>::iterator iter = menuList.begin(), end = menuList.end(); iter!=end; ++iter) { + if(!(*iter)) + continue; + vector<Tool*> menuToolList = (*iter)->GetToolList(); + if(!menuToolList.size()) + continue; + toolList.insert(toolList.end(), menuToolList.begin(), menuToolList.end()); + } + ui::Engine::Ref().ShowWindow(new ElementSearchActivity(gameModel, toolList)); +} + void GameController::OpenTags() { if(gameModel->GetUser().ID) |
