mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-14 07:35:10 +01:00
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:
@@ -1,16 +1,21 @@
|
||||
package eu.midnightdust.midnightcontrols.client.compat;
|
||||
|
||||
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
||||
import io.github.kosmx.emotes.arch.gui.EmoteMenuImpl;
|
||||
import io.github.kosmx.emotes.arch.gui.screen.ingame.FastChosseScreen;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
|
||||
public class EmotecraftCompat {
|
||||
private static final MinecraftClient client = MinecraftClient.getInstance();
|
||||
public static void openEmotecraftScreen(Screen parent) {
|
||||
client.setScreen(new EmoteMenuImpl(parent));
|
||||
}
|
||||
public static boolean isEmotecraftScreen(Screen screen) {
|
||||
return screen instanceof FastChosseScreen;
|
||||
}
|
||||
public static void handleEmoteSelector(int index) {
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
|
||||
if (client.currentScreen instanceof FastChosseScreen) {
|
||||
int x = client.getWindow().getWidth() / 2;
|
||||
int y = client.getWindow().getHeight() / 2;
|
||||
|
||||
Reference in New Issue
Block a user