mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- can disable mouse movement which scrolls the world camera. in glestuser.ini add:
MouseMoveScrollsWorld=false
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user