diff options
Diffstat (limited to 'src/View/MapView.cpp')
-rw-r--r-- | src/View/MapView.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/View/MapView.cpp b/src/View/MapView.cpp index 1d074bc..7aa5482 100644 --- a/src/View/MapView.cpp +++ b/src/View/MapView.cpp @@ -85,12 +85,12 @@ void MapView::move(float x, float y, unsigned int state) { mainView->setYCenter(mainView->getYCenter() - y/scale); } -void MapView::click(float x, float y) { - if(!mainView) +void MapView::click(float x, float y, unsigned int button) { + if(!mainView || button != 1) return; - mainView->setXCenter(xCenter + (x - viewWidth/2)/scale); - mainView->setYCenter(yCenter + (y - viewHeight/2)/scale); + mainView->setXCenter(xCenter + x/scale); + mainView->setYCenter(yCenter + y/scale); } void MapView::render() { |