diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-03-28 23:59:10 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-03-28 23:59:10 (GMT) |
| commit | 1f388e4ca02f0a84e4b9d9b19e6308224389818d (patch) | |
| tree | 3cb5d7caf052d57e6873a291bbe451a4119bdcef /src/game/GameView.cpp | |
| parent | e9770d8ee7a44d5680c23749c786a03c0d5b41ff (diff) | |
| download | powder-1f388e4ca02f0a84e4b9d9b19e6308224389818d.zip powder-1f388e4ca02f0a84e4b9d9b19e6308224389818d.tar.gz | |
Exception when loading invalid save
Diffstat (limited to 'src/game/GameView.cpp')
| -rw-r--r-- | src/game/GameView.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 16f7551..7faeaf1 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -2,6 +2,7 @@ #include "Config.h" #include "GameView.h" +#include "Graphics.h" #include "interface/Window.h" #include "interface/Button.h" #include "interface/Colour.h" @@ -482,7 +483,7 @@ void GameView::OnMouseDown(int x, int y, unsigned button) { if(selectMode!=SelectNone) { - if(button!=3) + if(button==BUTTON_LEFT) { selectPoint1 = ui::Point(x, y); selectPoint2 = selectPoint1; @@ -517,7 +518,7 @@ void GameView::OnMouseUp(int x, int y, unsigned button) int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; int x1 = (selectPoint2.X<selectPoint1.X)?selectPoint2.X:selectPoint1.X; int y1 = (selectPoint2.Y<selectPoint1.Y)?selectPoint2.Y:selectPoint1.Y; - if(button !=3 && x2-x1>0 && y2-y1>0) + if(button==BUTTON_LEFT && x2-x1>0 && y2-y1>0) { if(selectMode==SelectCopy) c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); |
