Bring in the UI fixes #36

Merged
selimaj-dev merged 3 commits from ui-fixes into master 2026-09-27 17:16:15 +00:00
Showing only changes of commit 85a46c0bba - Show all commits
@@ -12,6 +12,7 @@ import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; import org.saturnclient.common.provider.Providers;
import org.saturnclient.client.ServiceClient; import org.saturnclient.client.ServiceClient;
import org.saturnclient.emotes.fabric.Emotes; import org.saturnclient.emotes.fabric.Emotes;
import org.saturnclient.impl.ui.SaturnScreenFabric;
import org.saturnclient.ui.screens.EmoteWheel; import org.saturnclient.ui.screens.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
@@ -51,12 +52,20 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new ShiftMenu()); Providers.saturn.getClient().setScreen(new ShiftMenu());
} }
if (Config.openEmoteWheel.wasKeyPressed() && client.currentScreen == null // The emote wheel key opens the wheel, and closes it again while it's open. Closing it
// from the screen's own key handling would reopen it on the next tick, since the key is
// still down and no screen is open by then.
if (Config.openEmoteWheel.wasKeyPressed()
//? if >=1.21.9 { //? if >=1.21.9 {
&& !InputUtil.isKeyPressed(client.getWindow(), GLFW.GLFW_KEY_F3)) { && !InputUtil.isKeyPressed(client.getWindow(), GLFW.GLFW_KEY_F3)) {
//?} else //?} else
//&& !InputUtil.isKeyPressed(client.getWindow().getHandle(), GLFW.GLFW_KEY_F3)) { //&& !InputUtil.isKeyPressed(client.getWindow().getHandle(), GLFW.GLFW_KEY_F3)) {
if (client.currentScreen == null) {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} else if (client.currentScreen instanceof SaturnScreenFabric saturnScreen
&& saturnScreen.screen instanceof EmoteWheel) {
saturnScreen.close();
}
} }
// Sneaking cancels your own emote, for everyone. // Sneaking cancels your own emote, for everyone.