diff options
| author | Simon 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) |
| commit | ba802b3243c3e1721a84126e2bed6c3b24532b27 (patch) | |
| tree | 858767f6f853c798809b5c595cd813e493cd75b8 /src/elementsearch/ElementSearchActivity.h | |
| parent | f5547f267b9e73be3d8153df3dd36d7e3b69a2d9 (diff) | |
| download | powder-ba802b3243c3e1721a84126e2bed6c3b24532b27.zip powder-ba802b3243c3e1721a84126e2bed6c3b24532b27.tar.gz | |
Element search
Diffstat (limited to 'src/elementsearch/ElementSearchActivity.h')
| -rw-r--r-- | src/elementsearch/ElementSearchActivity.h | 39 |
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..7ed7611 --- /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 "interface/Window.h" +#include "interface/Textbox.h" +#include "game/ToolButton.h" + +class Tool; + +class GameModel; + +class ElementSearchActivity: public ui::Window { + 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 Exit(); + 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_ */ |
