- can disable mouse movement which scrolls the world camera. in glestuser.ini add:

MouseMoveScrollsWorld=false
This commit is contained in:
Mark Vejvoda
2011-08-31 00:24:14 +00:00
parent b2fc331876
commit a7e08e3b55

View File

@@ -1401,24 +1401,27 @@ void Game::mouseMove(int x, int y, const MouseState *ms) {
//if(Window::isKeyDown() == false) //if(Window::isKeyDown() == false)
if(!camLeftButtonDown && !camRightButtonDown && !camUpButtonDown && !camDownButtonDown) if(!camLeftButtonDown && !camRightButtonDown && !camUpButtonDown && !camDownButtonDown)
{ {
if (y < 10) { bool mouseMoveScrollsWorld = Config::getInstance().getBool("MouseMoveScrollsWorld","true");
gameCamera.setMoveZ(-scrollSpeed); if(mouseMoveScrollsWorld == true) {
} if (y < 10) {
else if (y > metrics.getVirtualH() - 10) { gameCamera.setMoveZ(-scrollSpeed);
gameCamera.setMoveZ(scrollSpeed); }
} else if (y > metrics.getVirtualH() - 10) {
else { gameCamera.setMoveZ(scrollSpeed);
gameCamera.setMoveZ(0); }
} else {
gameCamera.setMoveZ(0);
}
if (x < 10) { if (x < 10) {
gameCamera.setMoveX(-scrollSpeed); gameCamera.setMoveX(-scrollSpeed);
} }
else if (x > metrics.getVirtualW() - 10) { else if (x > metrics.getVirtualW() - 10) {
gameCamera.setMoveX(scrollSpeed); gameCamera.setMoveX(scrollSpeed);
} }
else { else {
gameCamera.setMoveX(0); gameCamera.setMoveX(0);
}
} }
} }