1
0
forked from Clones/Controlify

better navigation

This commit is contained in:
isXander
2023-04-16 16:38:44 +01:00
parent 8eb8510590
commit 6eaf16d8c3
11 changed files with 277 additions and 189 deletions

View File

@ -44,7 +44,9 @@ public interface Controller<S extends ControllerState, C extends ControllerConfi
void clearState();
default void close() {}
RumbleManager rumbleManager();
boolean canRumble();
default boolean canBeUsed() {
return true;
@ -88,6 +90,7 @@ public interface Controller<S extends ControllerState, C extends ControllerConfi
CONTROLLERS.remove(controller.uid(), controller);
}
@Deprecated
Controller<?, ?> DUMMY = new Controller<>() {
private final ControllerBindings<ControllerState> bindings = new ControllerBindings<>(this);
private final RumbleManager rumbleManager = new RumbleManager(new RumbleCapable() {
@ -182,5 +185,10 @@ public interface Controller<S extends ControllerState, C extends ControllerConfi
public RumbleManager rumbleManager() {
return rumbleManager;
}
@Override
public boolean canRumble() {
return false;
}
};
}