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/GameView.cpp | |
| parent | 70758cc70ef80632f6814c4fc4f9f13430bf8057 (diff) | |
| download | powder-e13476a4063bd7bdf428d53fd686864c1c90e0ec.zip powder-e13476a4063bd7bdf428d53fd686864c1c90e0ec.tar.gz | |
Cut region, fixes #105
Diffstat (limited to 'src/game/GameView.cpp')
| -rw-r--r-- | src/game/GameView.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index e73d509..a149053 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -1032,6 +1032,8 @@ void GameView::OnMouseUp(int x, int y, unsigned button) { if(selectMode==SelectCopy) c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + else if(selectMode==SelectCut) + c->CutRegion(ui::Point(x1, y1), ui::Point(x2, y2)); else if(selectMode==SelectStamp) c->StampRegion(ui::Point(x1, y1), ui::Point(x2, y2)); } @@ -1299,6 +1301,15 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool infoTipPresence = 120; } break; + case 'x': + if(ctrl) + { + selectMode = SelectCut; + selectPoint1 = ui::Point(-1, -1); + infoTip = "\x0F\xEF\xEF\x10Select an area to cut"; + infoTipPresence = 120; + } + break; case 'v': if(ctrl) { |
