public static boolean isKeyPressed(int key) { if (USE_ONLY_DOWN) { if (key == SysKey.ANY_KEY) { return keys.length > 0 && only_key.isPressed(); } else { return keys.contains(key) && only_key.isPressed(); } } else { if (key == SysKey.ANY_KEY) { return keys.length > 0; } else { return keys.contains(key); } } }
public static boolean isKeyRelease(int key) { if (key == SysKey.ANY_KEY) { return keys.length > 0 && !only_key.isPressed(); } else { return keys.contains(key) && !only_key.isPressed(); } }
public static void addKey(int key) { keys.add(key); }
public static void removeKey(int key) { keys.removeValue(key); }
public static void clear() { keys.clear(); }