diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-10-26 00:00:41 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-10-26 00:02:20 (GMT) |
| commit | 30d985ba7716238819185b96f811f7f6e5f4ffdb (patch) | |
| tree | a8c17cac144b5fc663adfa66e0220d6adf3a56e9 /src | |
| parent | aa09c0e7536214f20e978fd4136c418732ae38d9 (diff) | |
| download | powder-30d985ba7716238819185b96f811f7f6e5f4ffdb.zip powder-30d985ba7716238819185b96f811f7f6e5f4ffdb.tar.gz | |
Only cancel click events clickable signs (not all signs)
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/game/GameController.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 9f69f02..cfcb5e6 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -568,8 +568,11 @@ bool GameController::MouseDown(int x, int y, unsigned button) y = point.Y; if(ret && y<YRES && x<XRES) if (gameModel->GetActiveTool(0)->GetIdentifier() != "DEFAULT_UI_SIGN" || button != BUTTON_LEFT) //If it's not a sign tool or you are right/middle clicking - if(GetSignAt(x, y)) + { + sign * foundSign = GetSignAt(x, y); + if(foundSign && splitsign(foundSign->text.c_str())) return false; + } return ret; } @@ -585,12 +588,12 @@ bool GameController::MouseUp(int x, int y, unsigned button) { sign * foundSign = GetSignAt(x, y); if(foundSign) { - ret = false; const char* str=foundSign->text.c_str(); char type; int pos=splitsign(str, &type); if (pos) { + ret = false; if(type == 'c' || type == 't') { char buff[256]; strcpy(buff, str+3); |
