Fixed the mouse y invert thingy
This commit is contained in:
parent
5d07cd2dee
commit
575e0158ea
3 changed files with 8 additions and 9 deletions
|
|
@ -41,11 +41,11 @@ public class InGameMouseInput extends MouseInput{
|
|||
}
|
||||
// mov cam upp
|
||||
if(y < CAMERA_MOVE_BORDER){
|
||||
LWJGLGameWindow.getCamera().getLocation().add(0,CAMERA_MOVE_SPEED,0);
|
||||
LWJGLGameWindow.getCamera().getLocation().add(0,-CAMERA_MOVE_SPEED,0);
|
||||
}
|
||||
// mov cam down
|
||||
if(y > LWJGLGameWindow.getHeight()-CAMERA_MOVE_BORDER){
|
||||
LWJGLGameWindow.getCamera().getLocation().add(0,-CAMERA_MOVE_SPEED,0);
|
||||
LWJGLGameWindow.getCamera().getLocation().add(0,CAMERA_MOVE_SPEED,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ public class InGameMouseInput extends MouseInput{
|
|||
System.out.println("DOWN("+event+"): "+x+"-"+y);
|
||||
Vector2i pos = map.getPosByPixel(
|
||||
LWJGLGameWindow.getCamera().getLocation().getX()+x,
|
||||
LWJGLGameWindow.getCamera().getLocation().getY()+(LWJGLGameWindow.getHeight()-y));
|
||||
LWJGLGameWindow.getCamera().getLocation().getY()+y);
|
||||
if(!map.isPosEmpty(pos.getX(), pos.getY())){
|
||||
//map.printAllUnits();
|
||||
selected.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue