MidnightControls 0.1.0 (Beta)

Changes from LambdaControls:
- Support for Steam Deck and Dualsense
- Support for L4, L5, R4, R5 buttons
- Updated Libraries
- New Logo and Name
- Lots of Bugfixes
- MidnightConfig backend
This commit is contained in:
Motschen
2022-03-12 22:33:19 +01:00
parent bfaa4f5d9a
commit 5fcf4c2b1b
113 changed files with 2934 additions and 3307 deletions

View File

@@ -0,0 +1,48 @@
/*
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
*
* This file is part of midnightcontrols.
*
* Licensed under the MIT license. For more information,
* see the LICENSE file.
*/
package eu.midnightdust.midnightcontrols.client;
/**
* Represents a button state.
*
* @author LambdAurora
* @version 1.1.0
* @since 1.1.0
*/
public enum ButtonState {
NONE(0),
PRESS(1),
RELEASE(2),
REPEAT(3);
public final int id;
ButtonState(int id) {
this.id = id;
}
/**
* Returns whether this state is a pressed state.
*
* @return true if this state is a pressed state, else false
*/
public boolean isPressed() {
return this == PRESS || this == REPEAT;
}
/**
* Returns whether this state is an unpressed state.
*
* @return true if this state is an unpressed state, else false
*/
public boolean isUnpressed() {
return this == RELEASE || this == NONE;
}
}