Klasse ImGuiImplGlfw
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.backend.ImGuiImplGlfw
This class is a straightforward port of the
imgui_impl_glfw.cpp.
It supports clipboard, gamepad, mouse and keyboard in the same way the original Dear ImGui code does. You can copy-paste this class in your codebase and modify the rendering routine in the way you'd like.
MODIFIED: Clipboard handled via minecraft X11 bug fixed.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifikator und TypKlasseBeschreibungprotected static classData class to store implementation specific fields. -
Feldübersicht
FelderModifikator und TypFeldBeschreibungprotected ImGuiImplGlfw.Dataprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final booleanprotected static final intprotected static final booleanprotected static final booleanprotected static final booleanprotected static final String -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidcharCallback(long window, int c) voidcursorEnterCallback(long window, boolean entered) voidcursorPosCallback(long window, double x, double y) protected voidprotected voidfreeCallback(org.lwjgl.system.Callback cb) protected imgui.callback.ImStrSupplierstatic floatgetContentScaleForMonitor(long monitor) static floatgetContentScaleForWindow(long window) static intglfwKeyToImGuiKey(int glfwKey) booleaninit(long window, boolean installCallbacks) booleaninitForOpenGL(long window, boolean installCallbacks) booleaninitForOther(long window, boolean installCallbacks) booleaninitForVulkan(long window, boolean installCallbacks) protected voidvoidinstallCallbacks(long window) voidkeyCallback(long window, int keycode, int scancode, int action, int mods) voidmonitorCallback(long window, int event) voidmouseButtonCallback(long window, int button, int action, int mods) protected ImGuiImplGlfw.DatanewData()voidnewFrame()voidrestoreCallbacks(long window) voidscrollCallback(long window, double xOffset, double yOffset) voidsetCallbacksChainForAllWindows(boolean chainForAllWindows) Set to 'true' to enable chaining installed callbacks for all windows (including secondary viewports created by backends or by user).protected imgui.callback.ImStrConsumerprotected booleanshouldChainCallback(long window) voidshutdown()protected voidstatic voidsleep(long milliseconds) protected inttranslateUntranslatedKey(int key, int scancode) protected voidprotected voidupdateKeyModifiers(long window) protected voidprotected voidprotected voidvoidwindowFocusCallback(long window, boolean focused)
-
Felddetails
-
OS
-
IS_WINDOWS
protected static final boolean IS_WINDOWS -
IS_APPLE
protected static final boolean IS_APPLE -
IS_LINUX
protected static final boolean IS_LINUX -
glfwVersionCombined
protected static final int glfwVersionCombined- Siehe auch:
-
glfwHawWindowTopmost
protected static final boolean glfwHawWindowTopmost- Siehe auch:
-
glfwHasWindowHovered
protected static final boolean glfwHasWindowHovered- Siehe auch:
-
glfwHasWindowAlpha
protected static final boolean glfwHasWindowAlpha- Siehe auch:
-
glfwHasPerMonitorDpi
protected static final boolean glfwHasPerMonitorDpi- Siehe auch:
-
glfwHasFocusWindow
protected static final boolean glfwHasFocusWindow- Siehe auch:
-
glfwHasFocusOnShow
protected static final boolean glfwHasFocusOnShow- Siehe auch:
-
glfwHasMonitorWorkArea
protected static final boolean glfwHasMonitorWorkArea- Siehe auch:
-
glfwHasOsxWindowPosFix
protected static final boolean glfwHasOsxWindowPosFix- Siehe auch:
-
glfwHasNewCursors
protected static final boolean glfwHasNewCursors- Siehe auch:
-
glfwHasMousePassthrough
protected static final boolean glfwHasMousePassthrough- Siehe auch:
-
glfwHasGamepadApi
protected static final boolean glfwHasGamepadApi- Siehe auch:
-
glfwHasGetKeyName
protected static final boolean glfwHasGetKeyName- Siehe auch:
-
glfwHasGetError
protected static final boolean glfwHasGetError- Siehe auch:
-
glfwHasGetPlatform
protected static final boolean glfwHasGetPlatform- Siehe auch:
-
data
-
-
Konstruktordetails
-
ImGuiImplGlfw
public ImGuiImplGlfw()
-
-
Methodendetails
-
glfwKeyToImGuiKey
public static int glfwKeyToImGuiKey(int glfwKey) -
getContentScaleForWindow
public static float getContentScaleForWindow(long window) -
getContentScaleForMonitor
public static float getContentScaleForMonitor(long monitor) -
sleep
public static void sleep(long milliseconds) -
getClipboardTextFn
protected imgui.callback.ImStrSupplier getClipboardTextFn() -
setClipboardTextFn
protected imgui.callback.ImStrConsumer setClipboardTextFn() -
shouldChainCallback
protected boolean shouldChainCallback(long window) -
scrollCallback
public void scrollCallback(long window, double xOffset, double yOffset) -
updateKeyModifiers
protected void updateKeyModifiers(long window) -
mouseButtonCallback
public void mouseButtonCallback(long window, int button, int action, int mods) -
translateUntranslatedKey
protected int translateUntranslatedKey(int key, int scancode) -
eatErrors
protected void eatErrors() -
cursorPosCallback
public void cursorPosCallback(long window, double x, double y) -
keyCallback
public void keyCallback(long window, int keycode, int scancode, int action, int mods) -
charCallback
public void charCallback(long window, int c) -
windowFocusCallback
public void windowFocusCallback(long window, boolean focused) -
installCallbacks
public void installCallbacks(long window) -
freeCallback
protected void freeCallback(org.lwjgl.system.Callback cb) -
restoreCallbacks
public void restoreCallbacks(long window) -
cursorEnterCallback
public void cursorEnterCallback(long window, boolean entered) -
newData
-
monitorCallback
public void monitorCallback(long window, int event) -
setCallbacksChainForAllWindows
public void setCallbacksChainForAllWindows(boolean chainForAllWindows) Set to 'true' to enable chaining installed callbacks for all windows (including secondary viewports created by backends or by user). -
init
public boolean init(long window, boolean installCallbacks) -
initForOpenGL
public boolean initForOpenGL(long window, boolean installCallbacks) -
initForVulkan
public boolean initForVulkan(long window, boolean installCallbacks) -
initForOther
public boolean initForOther(long window, boolean installCallbacks) -
shutdown
public void shutdown() -
updateMouseData
protected void updateMouseData() -
updateMouseCursor
protected void updateMouseCursor() -
updateGamepads
protected void updateGamepads() -
updateMonitors
protected void updateMonitors() -
newFrame
public void newFrame() -
initPlatformInterface
protected void initPlatformInterface() -
shutdownPlatformInterface
protected void shutdownPlatformInterface()
-