diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-14 15:28:44 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-14 15:28:44 (GMT) |
| commit | e13476a4063bd7bdf428d53fd686864c1c90e0ec (patch) | |
| tree | 901203df56ec6d6142f2996a55f01a55ca823e59 /src/game/GameController.cpp | |
| parent | 70758cc70ef80632f6814c4fc4f9f13430bf8057 (diff) | |
| download | powder-e13476a4063bd7bdf428d53fd686864c1c90e0ec.zip powder-e13476a4063bd7bdf428d53fd686864c1c90e0ec.tar.gz | |
Cut region, fixes #105
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 0855d04..9831c78 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -432,6 +432,12 @@ void GameController::CopyRegion(ui::Point point1, ui::Point point2) gameModel->SetClipboard(newSave); } +void GameController::CutRegion(ui::Point point1, ui::Point point2) +{ + CopyRegion(point1, point2); + gameModel->GetSimulation()->clear_area(point1.X, point1.Y, point2.X-point1.X, point2.Y-point1.Y); +} + bool GameController::MouseMove(int x, int y, int dx, int dy) { return commandInterface->OnMouseMove(x, y, dx, dy); |
