Another round of improvements

Mostly related to touch screen support
- Added selection outlines for Break-at-Finger mode
- Breaking blocks/interacting with entities will now just check if the target changed, not the finger position
- Added the ability to create custom touch buttons out of ButtonBindings
- Redesigned top touch buttons
- Added emote touch button when Emotecraft is installed
- Updated SpruceUI
- Removed old mixins
This commit is contained in:
Motschen
2023-09-30 20:27:03 +02:00
parent de7cf8a307
commit 1186c9c241
17 changed files with 213 additions and 129 deletions

View File

@@ -33,7 +33,7 @@ public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
@Inject(method = "init", at = @At(value = "INVOKE", ordinal = 1, shift = At.Shift.AFTER, target = "Lnet/minecraft/client/gui/screen/option/ControlsOptionsScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;"))
private void addControllerButton(CallbackInfo ci) {
TextIconButtonWidget iconWidget = TextIconButtonWidget.builder(Text.translatable("midnightcontrols.menu.title.controller"), (button -> this.client.setScreen(new MidnightControlsSettingsScreen(this, false))), true)
.dimension(20,20).texture(new Identifier("midnightcontrols", "icon/button"), 20, 20).build();
.dimension(20,20).texture(new Identifier("midnightcontrols", "icon/controller"), 20, 20).build();
iconWidget.setPosition(this.width / 2 + 158, this.height / 6 - 12);
this.addDrawableChild(iconWidget);
}