1
0
forked from Clones/Controlify

YACL 3.x port with new controller carousel select screen

This commit is contained in:
isXander
2023-05-29 07:04:30 +01:00
parent 74880ad17a
commit b8c38cefc2
24 changed files with 976 additions and 526 deletions

View File

@ -1,7 +1,7 @@
package dev.isxander.controlify.mixins.feature.settingsbutton;
import com.llamalad7.mixinextras.sugar.Local;
import dev.isxander.controlify.config.gui.YACLHelper;
import dev.isxander.controlify.config.gui.ControllerCarouselScreen;
import net.minecraft.client.Options;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.screens.OptionsSubScreen;
@ -22,7 +22,7 @@ public class ControlsScreenMixin extends OptionsSubScreen {
@Inject(method = "init", at = @At("RETURN"))
private void addControllerSettings(CallbackInfo ci, @Local(ordinal = 0) int leftX, @Local(ordinal = 1) int rightX, @Local(ordinal = 2) int currentY) {
addRenderableWidget(Button.builder(Component.translatable("controlify.gui.button"), btn -> minecraft.setScreen(YACLHelper.openConfigScreen(this)))
addRenderableWidget(Button.builder(Component.translatable("controlify.gui.button"), btn -> minecraft.setScreen(ControllerCarouselScreen.createConfigScreen(this)))
.pos(leftX, currentY)
.width(150)
.build());