crimsoncarnage
New Member
When i use mouseListener and I chek for a middle mouse button it does not react properly I don't know why but it looks like i need to scroll while cliking to get the event to occursome part of my code if it helps\[code\]public void mouseClicked(MouseEvent e) { if(new Rectangle(0,0,1274,30).contains(Screen.mse)){ TopMenu.click(); }else if(new Rectangle(0,31,1100,549).contains(Screen.mse)){ Map.cliked(e.getButton(),0); System.out.println("mouse:"+e.getButton()); }else if(new Rectangle(1100,30,174,550).contains(Screen.mse)){ //cliked ModeMenu }else if(new Rectangle(0,580,1100,164).contains(Screen.mse)){ //cliked ToolsMenu }else{ //cliked mode change } switch(e.getModifiers()) { case InputEvent.BUTTON1_MASK: { System.out.println("That's the LEFT button"); break; } case InputEvent.BUTTON2_MASK: { System.out.println("That's the MIDDLE button"); break; } case InputEvent.BUTTON3_MASK: { System.out.println("That's the RIGHT button"); break; } }}\[/code\]