forked from Clones/Controlify
refactor button guide, bindings and controller identification
This commit is contained in:
@ -31,9 +31,7 @@ public class JoystickButtonBind 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(buttonIndex).identifier();
|
||||
var texture = new ResourceLocation("controlify", "textures/gui/joystick/" + type + "/button_" + button + ".png");
|
||||
@ -56,6 +54,11 @@ public class JoystickButtonBind implements IBind<JoystickState> {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Controller<JoystickState, ?> controller() {
|
||||
return joystick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
Reference in New Issue
Block a user