diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
| commit | 4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch) | |
| tree | 3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/interface/Sandbox.h | |
| parent | 6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff) | |
| download | powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz | |
Some minor changes
Diffstat (limited to 'src/interface/Sandbox.h')
| -rw-r--r-- | src/interface/Sandbox.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/interface/Sandbox.h b/src/interface/Sandbox.h new file mode 100644 index 0000000..fb4a668 --- /dev/null +++ b/src/interface/Sandbox.h @@ -0,0 +1,39 @@ +/* + * Sandbox.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef SANDBOX_H_ +#define SANDBOX_H_ + +#include <queue> +#include "Point.h" +#include "Component.h" +#include "Simulation.h" +#include "Renderer.h" + +namespace ui { + +class Sandbox: public ui::Component { +private: + int lastCoordX, lastCoordY; + int activeElement; + std::queue<Point*> pointQueue; + bool isMouseDown; + Renderer * ren; + Simulation * sim; +public: + Sandbox(); + virtual Simulation * GetSimulation(); + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + virtual void OnMouseClick(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void Draw(const Point& screenPos); + virtual void Tick(float delta); + virtual ~Sandbox(); +}; + +} /* namespace ui */ +#endif /* SANDBOX_H_ */ |
