summaryrefslogtreecommitdiff
path: root/src/game/GameView.h
diff options
context:
space:
mode:
authorSimon 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)
commit4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch)
tree3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/game/GameView.h
parent6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff)
downloadpowder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip
powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz
Some minor changes
Diffstat (limited to 'src/game/GameView.h')
-rw-r--r--src/game/GameView.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/game/GameView.h b/src/game/GameView.h
new file mode 100644
index 0000000..531a4b9
--- /dev/null
+++ b/src/game/GameView.h
@@ -0,0 +1,48 @@
+#ifndef GAMEVIEW_H
+#define GAMEVIEW_H
+
+#include <queue>
+#include "GameController.h"
+#include "GameModel.h"
+#include "interface/Window.h"
+#include "interface/Point.h"
+#include "interface/Button.h"
+
+using namespace std;
+
+class GameController;
+class GameModel;
+class GameView: public ui::Window
+{
+private:
+ bool isMouseDown;
+ queue<ui::Point*> pointQueue;
+ GameController * c;
+ Renderer * ren;
+ //UI Elements
+ ui::Button * pauseButton;
+public:
+ GameView();
+ void AttachController(GameController * _c){ c = _c; }
+ void NotifyRendererChanged(GameModel * sender);
+ void NotifySimulationChanged(GameModel * sender);
+ void NotifyPausedChanged(GameModel * sender);
+ /*virtual void DoMouseMove(int x, int y, int dx, int dy);
+ virtual void DoMouseDown(int x, int y, unsigned button);
+ virtual void DoMouseUp(int x, int y, unsigned button);
+ //virtual void DoMouseWheel(int x, int y, int d);
+ //virtual void DoKeyPress(int key, bool shift, bool ctrl, bool alt);
+ //virtual void DoKeyRelease(int key, bool shift, bool ctrl, bool alt);
+ virtual void DoTick(float dt);
+ virtual void DoDraw();*/
+ virtual void OnMouseMove(int x, int y, int dx, int dy);
+ virtual void OnMouseDown(int x, int y, unsigned button);
+ virtual void OnMouseUp(int x, int y, unsigned button);
+ //virtual void OnMouseWheel(int x, int y, int d) {}
+ //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {}
+ //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {}
+ virtual void OnTick(float dt);
+ virtual void OnDraw();
+};
+
+#endif // GAMEVIEW_H