mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Added some isCreated() methods to input classes and keyboard key name mapping
This commit is contained in:
parent
5da72080f0
commit
99588933cf
4 changed files with 81 additions and 30 deletions
|
|
@ -104,9 +104,9 @@ public class Mouse {
|
|||
if (!nCreate())
|
||||
throw new Exception("The mouse could not be created.");
|
||||
created = true;
|
||||
|
||||
//set mouse buttons
|
||||
buttons = new boolean[buttonCount];
|
||||
|
||||
//set mouse buttons
|
||||
buttons = new boolean[buttonCount];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -116,6 +116,13 @@ public class Mouse {
|
|||
*/
|
||||
private static native boolean nCreate();
|
||||
|
||||
/**
|
||||
* @return true if the mouse has been created
|
||||
*/
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* "Destroy" the mouse
|
||||
*/
|
||||
|
|
@ -123,8 +130,8 @@ public class Mouse {
|
|||
if (!created)
|
||||
return;
|
||||
created = false;
|
||||
buttons = null;
|
||||
|
||||
buttons = null;
|
||||
|
||||
nDestroy();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue