diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 16:03:18 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 16:03:18 (GMT) |
| commit | 1d297cb57a338f2a9e34d0f16642afc6a83c1041 (patch) | |
| tree | 7d5514be702ff98f9b1e53eecdbf0c67096d76f6 /src/game/GameView.h | |
| parent | 259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec (diff) | |
| download | powder-1d297cb57a338f2a9e34d0f16642afc6a83c1041.zip powder-1d297cb57a338f2a9e34d0f16642afc6a83c1041.tar.gz | |
Line and rect drawing
Diffstat (limited to 'src/game/GameView.h')
| -rw-r--r-- | src/game/GameView.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/game/GameView.h b/src/game/GameView.h index 1cd69c0..716147c 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -8,25 +8,33 @@ #include "interface/Window.h" #include "interface/Point.h" #include "interface/Button.h" +#include "ToolButton.h" #include "Brush.h" using namespace std; +enum DrawMode +{ + DrawPoints, DrawLine, DrawRect, DrawFill +}; + class GameController; class GameModel; class GameView: public ui::Window { private: + DrawMode drawMode; bool isMouseDown; bool zoomEnabled; bool zoomCursorFixed; + int toolIndex; queue<ui::Point*> pointQueue; GameController * c; Renderer * ren; Brush * activeBrush; //UI Elements vector<ui::Button*> menuButtons; - vector<ui::Button*> toolButtons; + vector<ToolButton*> toolButtons; ui::Button * searchButton; ui::Button * reloadButton; ui::Button * saveSimulationButton; @@ -39,6 +47,10 @@ private: ui::Button * displayModeButton; ui::Button * pauseButton; ui::Point currentMouse; + + bool drawModeReset; + ui::Point drawPoint1; + ui::Point drawPoint2; public: GameView(); void AttachController(GameController * _c){ c = _c; } @@ -49,7 +61,7 @@ public: void NotifyBrushChanged(GameModel * sender); void NotifyMenuListChanged(GameModel * sender); void NotifyToolListChanged(GameModel * sender); - void NotifyActiveToolChanged(GameModel * sender); + void NotifyActiveToolsChanged(GameModel * sender); void NotifyUserChanged(GameModel * sender); void NotifyZoomChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); |
