1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#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;
ui::Button * searchButton;
public:
GameView();
void AttachController(GameController * _c){ c = _c; }
void NotifyRendererChanged(GameModel * sender);
void NotifySimulationChanged(GameModel * sender);
void NotifyPausedChanged(GameModel * sender);
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
|