forked from Clones/Controlify
(unused) abstract joystick renderer system + debug logging + tm joystick mapping
This commit is contained in:
@ -65,7 +65,7 @@ public class GamepadBind implements IBind<GamepadState> {
|
||||
private ResourceLocation getTexture(BuiltinGamepadTheme theme) {
|
||||
String themeId = theme.id();
|
||||
if (theme == BuiltinGamepadTheme.DEFAULT)
|
||||
themeId = gamepad.type().identifier();
|
||||
themeId = gamepad.type().themeId();
|
||||
return new ResourceLocation("controlify", "textures/gui/gamepad/" + themeId + "/" + identifier + ".png");
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class JoystickAxisBind implements IBind<JoystickState> {
|
||||
public void draw(PoseStack matrices, int x, int centerY) {
|
||||
JoystickMapping mapping = joystick.mapping();
|
||||
|
||||
String type = joystick.type().identifier();
|
||||
String type = joystick.type().themeId();
|
||||
String axis = mapping.axes()[axisIndex].identifier();
|
||||
String direction = mapping.axes()[axisIndex].getDirectionIdentifier(axisIndex, this.direction);
|
||||
var texture = new ResourceLocation("controlify", "textures/gui/joystick/" + type + "/axis_" + axis + "_" + direction + ".png");
|
||||
|
@ -30,7 +30,7 @@ public class JoystickButtonBind implements IBind<JoystickState> {
|
||||
|
||||
@Override
|
||||
public void draw(PoseStack matrices, int x, int centerY) {
|
||||
String type = joystick.type().identifier();
|
||||
String type = joystick.type().themeId();
|
||||
String button = joystick.mapping().buttons()[buttonIndex].identifier();
|
||||
var texture = new ResourceLocation("controlify", "textures/gui/joystick/" + type + "/button_" + button + ".png");
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class JoystickHatBind implements IBind<JoystickState> {
|
||||
|
||||
@Override
|
||||
public void draw(PoseStack matrices, int x, int centerY) {
|
||||
String type = joystick.type().identifier();
|
||||
String type = joystick.type().themeId();
|
||||
String hat = joystick.mapping().hats()[hatIndex].identifier();
|
||||
String direction = "centered";
|
||||
if (hatState.isUp())
|
||||
|
Reference in New Issue
Block a user