diff options
| author | jacob1 <jfu614@gmail.com> | 2012-11-17 00:22:34 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2012-11-17 00:22:34 (GMT) |
| commit | eb9b3f6bdf5bf1798f669288c407d4e0c316e090 (patch) | |
| tree | 44159cf1078040291e75ad4f767937a344e95eb1 /src/game/GameController.cpp | |
| parent | 6b846c6339fa9cf628dfd2450207c01067b8a4ad (diff) | |
| download | powder-eb9b3f6bdf5bf1798f669288c407d4e0c316e090.zip powder-eb9b3f6bdf5bf1798f669288c407d4e0c316e090.tar.gz | |
fix link signs ignoring the zoom window, allow right clicking link signs to use them while sign tool selected
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 0cff7d2..18b93d6 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -532,9 +532,12 @@ bool GameController::MouseDown(int x, int y, unsigned button) bool GameController::MouseUp(int x, int y, unsigned button) { bool ret = commandInterface->OnMouseUp(x, y, button); - if(ret && button == BUTTON_LEFT && y<YRES && x<XRES) + ui::Point point = PointTranslate(ui::Point(x, y)); + x = point.X; + y = point.Y; + if(ret && y<YRES && x<XRES) { - if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN")//If it's not a sign tool + if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking { Simulation * sim = gameModel->GetSimulation(); for (std::vector<sign>::iterator iter = sim->signs.begin(), end = sim->signs.end(); iter != end; ++iter) |
