The-Powder-Toy/includes/interface/Sandbox.h

40 lines
840 B
C
Raw Normal View History

2012-01-08 11:39:03 -06:00
/*
* Sandbox.h
*
* Created on: Jan 8, 2012
* Author: Simon
*/
#ifndef SANDBOX_H_
#define SANDBOX_H_
2012-01-14 12:51:24 -06:00
#include <queue>
#include "Point.h"
2012-01-08 11:39:03 -06:00
#include "Component.h"
#include "Simulation.h"
#include "Renderer.h"
namespace ui {
class Sandbox: public ui::Component {
private:
2012-01-11 16:59:45 -06:00
int lastCoordX, lastCoordY;
int activeElement;
2012-01-14 12:51:24 -06:00
std::queue<Point*> pointQueue;
2012-01-08 11:39:03 -06:00
bool isMouseDown;
Renderer * ren;
Simulation * sim;
public:
Sandbox();
2012-01-11 16:59:45 -06:00
virtual Simulation * GetSimulation();
2012-01-14 12:51:24 -06:00
virtual void OnMouseMoved(int localx, int localy, int dx, int dy);
virtual void OnMouseClick(int localx, int localy, unsigned int button);
virtual void OnMouseUnclick(int localx, int localy, unsigned int button);
virtual void Draw(const Point& screenPos);
2012-01-08 11:39:03 -06:00
virtual void Tick(float delta);
virtual ~Sandbox();
};
} /* namespace ui */
#endif /* SANDBOX_H_ */