Question about tooltips #1668
Answered
by
modmuss50
GalaxyGamingBoy
asked this question in
Mod Dev Support
-
How can I add a tooltip when you press LShift ? |
Beta Was this translation helpful? Give feedback.
Answered by
modmuss50
Aug 25, 2021
Replies: 2 comments 1 reply
-
I use the following helper for my mod, feel free to adjust and reuse it. Obviously, calling this on the server will cause a crash. public class InputHelper {
public static boolean isShiftPressed() {
long handle = MinecraftClient.getInstance().getWindow().getHandle();
return InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_LEFT_SHIFT) || InputUtil.isKeyPressed(handle, GLFW.GLFW_KEY_RIGHT_SHIFT);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Can you not just use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
modmuss50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you not just use
Screen.hasShiftDown()
from vanilla?