Don't throw exceptions on Mouse.getEventButtonState
This commit is contained in:
parent
7f9faf144d
commit
ec4a94d47d
|
@ -394,13 +394,10 @@ public class Mouse {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the current events button state. If <code>getEventButton()</code> is -1,
|
||||
* and IllegalStateException is thrown.
|
||||
* Get the current events button state.
|
||||
* @return Current events button state.
|
||||
*/
|
||||
public static boolean getEventButtonState() {
|
||||
if (eventButton == -1)
|
||||
throw new IllegalStateException("Current event has no button state change");
|
||||
return eventState;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue