summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-24 18:22:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-24 18:22:58 (GMT)
commitba802b3243c3e1721a84126e2bed6c3b24532b27 (patch)
tree858767f6f853c798809b5c595cd813e493cd75b8 /src/game/GameController.cpp
parentf5547f267b9e73be3d8153df3dd36d7e3b69a2d9 (diff)
downloadpowder-ba802b3243c3e1721a84126e2bed6c3b24532b27.zip
powder-ba802b3243c3e1721a84126e2bed6c3b24532b27.tar.gz
Element search
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp16
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)