1
0
forked from Clones/Controlify

refactor button guide, bindings and controller identification

This commit is contained in:
isXander
2023-02-19 21:56:14 +00:00
parent 23c048f401
commit 0f719c0f45
21 changed files with 334 additions and 220 deletions

View File

@ -33,9 +33,7 @@ public class JoystickHatBind implements IBind<JoystickState> {
}
@Override
public void draw(PoseStack matrices, int x, int centerY, Controller<JoystickState, ?> controller) {
if (controller != joystick) return;
public void draw(PoseStack matrices, int x, int centerY) {
String type = joystick.type().identifier();
String button = joystick.mapping().button(hatIndex).identifier();
String direction = "centered";
@ -69,6 +67,11 @@ public class JoystickHatBind implements IBind<JoystickState> {
return object;
}
@Override
public Controller<JoystickState, ?> controller() {
return joystick;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;