summaryrefslogtreecommitdiff
path: root/src/elementsearch/ElementSearchActivity.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
commit058a2edd75debbd0297f92572316daa704bd379f (patch)
treead303f091f9a08b209b91eb34a9fcad996a3de69 /src/elementsearch/ElementSearchActivity.h
parente3594aba9e05c6865d396418c028049cda92c2f3 (diff)
parent7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff)
downloadpowder-058a2edd75debbd0297f92572316daa704bd379f.zip
powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/elementsearch/ElementSearchActivity.h')
-rw-r--r--src/elementsearch/ElementSearchActivity.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/elementsearch/ElementSearchActivity.h b/src/elementsearch/ElementSearchActivity.h
new file mode 100644
index 0000000..de9700d
--- /dev/null
+++ b/src/elementsearch/ElementSearchActivity.h
@@ -0,0 +1,39 @@
+/*
+ * ElementSearchActivity.h
+ *
+ * Created on: Jun 24, 2012
+ * Author: Simon
+ */
+
+#ifndef ELEMENTSEARCHACTIVITY_H_
+#define ELEMENTSEARCHACTIVITY_H_
+
+#include <vector>
+#include <string>
+#include "Activity.h"
+#include "interface/Window.h"
+#include "interface/Textbox.h"
+#include "game/ToolButton.h"
+
+class Tool;
+
+class GameModel;
+
+class ElementSearchActivity: public WindowActivity {
+ Tool * firstResult;
+ GameModel * gameModel;
+ std::vector<Tool*> tools;
+ ui::Textbox * searchField;
+ std::vector<ToolButton*> toolButtons;
+ void searchTools(std::string query);
+public:
+ class ToolAction;
+ Tool * GetFirstResult() { return firstResult; }
+ ElementSearchActivity(GameModel * gameModel, std::vector<Tool*> tools);
+ void SetActiveTool(int selectionState, Tool * tool);
+ virtual ~ElementSearchActivity();
+ virtual void OnDraw();
+ virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+};
+
+#endif /* ELEMENTSEARCHACTIVITY_H_ */