summaryrefslogtreecommitdiffstats
path: root/src/View/MapView.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-05-20 11:55:04 +0200
committerneoraider <devnull@localhost>2008-05-20 11:55:04 +0200
commit5bb27d2b6d7915f03fd7e39444a2ff0fac537672 (patch)
tree16504dbcadf71afd3be79977d3eda2e0a562ed79 /src/View/MapView.cpp
parent094c72221ea15615b4bcdc31a4acbb4e5c67817a (diff)
downloadzoomedit-5bb27d2b6d7915f03fd7e39444a2ff0fac537672.tar
zoomedit-5bb27d2b6d7915f03fd7e39444a2ff0fac537672.zip
zoomedit:
* Added 2D vector maths * Made rooms selectable
Diffstat (limited to 'src/View/MapView.cpp')
-rw-r--r--src/View/MapView.cpp8
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() {