Class ImHotKey
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.hotkey.ImHotKey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidedit(ImHotKey.HotKey[] hotkeys, String popupModal) Renders the hotkey editor inside a named modal popup.intgetHotKey(ImHotKey.HotKey[] hotkeys) Returns the index of the hotkey currently held down, or -1 if none matches.getHotKeyLabel(long functionKeys, @Nullable net.minecraft.network.chat.Component functionName) Builds a display string such as "Ctrl + Shift + S", or "Save (Ctrl + Shift + S)" if functionName is non-null.booleanisPressed(ImHotKey.HotKey hotkey) Returns true on the frame a single HotKey is pressed (fire-and-forget convenience).longpack(int... imguiKeys) Packs one or more ImGuiKey values into the ordered bitfield format used by getHotKey().voidrender(ImHotKey.HotKey[] hotkeys) Renders the hotkey editor inline (inside a panel or window).void
-
Field Details
-
NO_HOTKEY
public static final long NO_HOTKEY- See Also:
-
-
Constructor Details
-
ImHotKey
public ImHotKey()
-
-
Method Details
-
setOnHotKeySet
-
getHotKeyLabel
public String getHotKeyLabel(long functionKeys, @Nullable net.minecraft.network.chat.Component functionName) Builds a display string such as "Ctrl + Shift + S", or "Save (Ctrl + Shift + S)" if functionName is non-null. -
render
Renders the hotkey editor inline (inside a panel or window). The editor is rendered only when hotkeys.length > 0. -
edit
Renders the hotkey editor inside a named modal popup. CallImGui.openPopup(popupModal)to open it. -
getHotKey
Returns the index of the hotkey currently held down, or -1 if none matches. -
pack
public long pack(int... imguiKeys) Packs one or more ImGuiKey values into the ordered bitfield format used by getHotKey(). Keys are sorted by keyboard layout order for consistent matching. -
isPressed
Returns true on the frame a single HotKey is pressed (fire-and-forget convenience).
-