feat(api): bump Dear ImGui from 1.87 to 1.88 (#309)
This commit is contained in:
1 parent
72a62131e8
commit
666d1112ab
29 files changed
+3247
-2482
No files matched your search
@@ -207,7 +207,8 @@ public final class ImDrawList extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
// Primitives
|
||||
// - For rectangular primitives, "pMin" and "pMax" represent the upper-left and lower-right corners.
|
||||
// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
|
||||
// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners.
|
||||
// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).
|
||||
// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12.
|
||||
// In future versions we will use textures to provide cheaper and higher-quality circles.
|
||||
@@ -770,9 +771,6 @@ public final class ImDrawList extends ImGuiStruct {
|
||||
THIS->AddPolyline(points, numPoint, col, imDrawFlags, thickness);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Note: Anti-aliased filling requires points to be in clockwise order.
|
||||
*/
|
||||
public void addConvexPolyFilled(final ImVec2[] points, final int numPoints, final int col) {
|
||||
nAddConvexPolyFilled(points, numPoints, col);
|
||||
}
|
||||
@@ -1084,6 +1082,7 @@ public final class ImDrawList extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
// Stateful path API, add points then finish with PathFillConvex() or PathStroke()
|
||||
// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing.
|
||||
|
||||
public void pathClear() {
|
||||
nPathClear();
|
||||
|
||||
@@ -339,6 +339,30 @@ public class ImGui {
|
||||
if (pOpen != NULL) env->ReleasePrimitiveArrayCritical(obj_pOpen, pOpen, JNI_FALSE);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create Debug Log window. display a simplified log of important dear imgui events.
|
||||
*/
|
||||
public static void showDebugLogWindow() {
|
||||
nShowDebugLogWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Debug Log window. display a simplified log of important dear imgui events.
|
||||
*/
|
||||
public static void showDebugLogWindow(final ImBoolean pOpen) {
|
||||
nShowDebugLogWindow(pOpen != null ? pOpen.getData() : null);
|
||||
}
|
||||
|
||||
private static native void nShowDebugLogWindow(); /*
|
||||
ImGui::ShowDebugLogWindow();
|
||||
*/
|
||||
|
||||
private static native void nShowDebugLogWindow(boolean[] pOpen); /*MANUAL
|
||||
auto pOpen = obj_pOpen == NULL ? NULL : (bool*)env->GetPrimitiveArrayCritical(obj_pOpen, JNI_FALSE);
|
||||
ImGui::ShowDebugLogWindow((pOpen != NULL ? &pOpen[0] : NULL));
|
||||
if (pOpen != NULL) env->ReleasePrimitiveArrayCritical(obj_pOpen, pOpen, JNI_FALSE);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
|
||||
*/
|
||||
@@ -10662,13 +10686,11 @@ public class ImGui {
|
||||
*/
|
||||
|
||||
// Tables
|
||||
// [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out!
|
||||
// - Full-featured replacement for old Columns API.
|
||||
// - See Demo->Tables for demo code.
|
||||
// - See top of imgui_tables.cpp for general commentary.
|
||||
// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary.
|
||||
// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
|
||||
// The typical call flow is:
|
||||
// - 1. Call BeginTable().
|
||||
// - 1. Call BeginTable(), early out if returning false.
|
||||
// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
|
||||
// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
|
||||
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
|
||||
@@ -10960,13 +10982,17 @@ public class ImGui {
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
*/
|
||||
|
||||
// Tables: Sorting
|
||||
// - Call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
|
||||
// - When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed
|
||||
// since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, else you may
|
||||
// wastefully sort your data every frame!
|
||||
// - Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
|
||||
// Tables: Sorting & Miscellaneous functions
|
||||
// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
|
||||
// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have
|
||||
// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
|
||||
// else you may wastefully sort your data every frame!
|
||||
// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
|
||||
|
||||
/**
|
||||
* Get latest sort specs for the table (NULL if not sorting).
|
||||
* Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
|
||||
*/
|
||||
public static ImGuiTableSortSpecs tableGetSortSpecs() {
|
||||
return new ImGuiTableSortSpecs(nTableGetSortSpecs());
|
||||
}
|
||||
@@ -12344,6 +12370,56 @@ public class ImGui {
|
||||
return (uintptr_t)ImGui::GetMainViewport();
|
||||
*/
|
||||
|
||||
// Background/Foreground Draw Lists
|
||||
|
||||
/**
|
||||
* Get background draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getBackgroundDrawList() {
|
||||
return new ImDrawList(nGetBackgroundDrawList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get background draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getBackgroundDrawList(final ImGuiViewport viewport) {
|
||||
return new ImDrawList(nGetBackgroundDrawList(viewport.ptr));
|
||||
}
|
||||
|
||||
private static native long nGetBackgroundDrawList(); /*
|
||||
return (uintptr_t)ImGui::GetBackgroundDrawList();
|
||||
*/
|
||||
|
||||
private static native long nGetBackgroundDrawList(long viewport); /*
|
||||
return (uintptr_t)ImGui::GetBackgroundDrawList(reinterpret_cast<ImGuiViewport*>(viewport));
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get foreground draw list for the viewport associated to the current window.
|
||||
* This draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getForegroundDrawList() {
|
||||
return new ImDrawList(nGetForegroundDrawList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get foreground draw list for the viewport associated to the current window.
|
||||
* This draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getForegroundDrawList(final ImGuiViewport viewport) {
|
||||
return new ImDrawList(nGetForegroundDrawList(viewport.ptr));
|
||||
}
|
||||
|
||||
private static native long nGetForegroundDrawList(); /*
|
||||
return (uintptr_t)ImGui::GetForegroundDrawList();
|
||||
*/
|
||||
|
||||
private static native long nGetForegroundDrawList(long viewport); /*
|
||||
return (uintptr_t)ImGui::GetForegroundDrawList(reinterpret_cast<ImGuiViewport*>(viewport));
|
||||
*/
|
||||
|
||||
// Miscellaneous Utilities
|
||||
|
||||
/**
|
||||
@@ -12409,53 +12485,7 @@ public class ImGui {
|
||||
return ImGui::GetFrameCount();
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get background draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getBackgroundDrawList() {
|
||||
return new ImDrawList(nGetBackgroundDrawList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get background draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getBackgroundDrawList(final ImGuiViewport viewport) {
|
||||
return new ImDrawList(nGetBackgroundDrawList(viewport.ptr));
|
||||
}
|
||||
|
||||
private static native long nGetBackgroundDrawList(); /*
|
||||
return (uintptr_t)ImGui::GetBackgroundDrawList();
|
||||
*/
|
||||
|
||||
private static native long nGetBackgroundDrawList(long viewport); /*
|
||||
return (uintptr_t)ImGui::GetBackgroundDrawList(reinterpret_cast<ImGuiViewport*>(viewport));
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get foreground draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getForegroundDrawList() {
|
||||
return new ImDrawList(nGetForegroundDrawList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get foreground draw list for the viewport associated to the current window.
|
||||
* This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
*/
|
||||
public static ImDrawList getForegroundDrawList(final ImGuiViewport viewport) {
|
||||
return new ImDrawList(nGetForegroundDrawList(viewport.ptr));
|
||||
}
|
||||
|
||||
private static native long nGetForegroundDrawList(); /*
|
||||
return (uintptr_t)ImGui::GetForegroundDrawList();
|
||||
*/
|
||||
|
||||
private static native long nGetForegroundDrawList(long viewport); /*
|
||||
return (uintptr_t)ImGui::GetForegroundDrawList(reinterpret_cast<ImGuiViewport*>(viewport));
|
||||
*/
|
||||
|
||||
// TODO GetDrawListSharedData
|
||||
|
||||
@@ -12859,29 +12889,16 @@ public class ImGui {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Attention: misleading name! manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle).
|
||||
* e.g. force capture keyboard when your widget is being hovered.
|
||||
* This is equivalent to setting "io.WantCaptureKeyboard = wantCaptureKeyboardValue"; after the next NewFrame() call.
|
||||
* Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle,
|
||||
* typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered.
|
||||
* This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
|
||||
*/
|
||||
public static void captureKeyboardFromApp() {
|
||||
nCaptureKeyboardFromApp();
|
||||
public static void setNextFrameWantCaptureKeyboard(final boolean wantCaptureKeyboard) {
|
||||
nSetNextFrameWantCaptureKeyboard(wantCaptureKeyboard);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attention: misleading name! manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle).
|
||||
* e.g. force capture keyboard when your widget is being hovered.
|
||||
* This is equivalent to setting "io.WantCaptureKeyboard = wantCaptureKeyboardValue"; after the next NewFrame() call.
|
||||
*/
|
||||
public static void captureKeyboardFromApp(final boolean wantCaptureKeyboardValue) {
|
||||
nCaptureKeyboardFromApp(wantCaptureKeyboardValue);
|
||||
}
|
||||
|
||||
private static native void nCaptureKeyboardFromApp(); /*
|
||||
ImGui::CaptureKeyboardFromApp();
|
||||
*/
|
||||
|
||||
private static native void nCaptureKeyboardFromApp(boolean wantCaptureKeyboardValue); /*
|
||||
ImGui::CaptureKeyboardFromApp(wantCaptureKeyboardValue);
|
||||
private static native void nSetNextFrameWantCaptureKeyboard(boolean wantCaptureKeyboard); /*
|
||||
ImGui::SetNextFrameWantCaptureKeyboard(wantCaptureKeyboard);
|
||||
*/
|
||||
|
||||
// Inputs Utilities: Mouse
|
||||
@@ -13323,27 +13340,16 @@ public class ImGui {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Attention: misleading name! manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle).
|
||||
* This is equivalent to setting "io.WantCaptureMouse = wantCaptureMouseValue;" after the next NewFrame() call.
|
||||
* Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle,
|
||||
* typical when true it instucts your app to ignore inputs).
|
||||
* This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call.
|
||||
*/
|
||||
public static void captureMouseFromApp() {
|
||||
nCaptureMouseFromApp();
|
||||
public static void setNextFrameWantCaptureMouse(final boolean wantCaptureMouse) {
|
||||
nSetNextFrameWantCaptureMouse(wantCaptureMouse);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attention: misleading name! manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle).
|
||||
* This is equivalent to setting "io.WantCaptureMouse = wantCaptureMouseValue;" after the next NewFrame() call.
|
||||
*/
|
||||
public static void captureMouseFromApp(final boolean wantCaptureMouseValue) {
|
||||
nCaptureMouseFromApp(wantCaptureMouseValue);
|
||||
}
|
||||
|
||||
private static native void nCaptureMouseFromApp(); /*
|
||||
ImGui::CaptureMouseFromApp();
|
||||
*/
|
||||
|
||||
private static native void nCaptureMouseFromApp(boolean wantCaptureMouseValue); /*
|
||||
ImGui::CaptureMouseFromApp(wantCaptureMouseValue);
|
||||
private static native void nSetNextFrameWantCaptureMouse(boolean wantCaptureMouse); /*
|
||||
ImGui::SetNextFrameWantCaptureMouse(wantCaptureMouse);
|
||||
*/
|
||||
|
||||
// Clipboard Utilities
|
||||
@@ -13448,7 +13454,16 @@ public class ImGui {
|
||||
*/
|
||||
|
||||
// Debug Utilities
|
||||
// - This is used by the IMGUI_CHECKVERSION() macro.
|
||||
|
||||
public static void debugTextEncoding(final String text) {
|
||||
nDebugTextEncoding(text);
|
||||
}
|
||||
|
||||
private static native void nDebugTextEncoding(String text); /*MANUAL
|
||||
auto text = obj_text == NULL ? NULL : (char*)env->GetStringUTFChars(obj_text, JNI_FALSE);
|
||||
ImGui::DebugTextEncoding(text);
|
||||
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
|
||||
*/
|
||||
|
||||
public static boolean debugCheckVersionAndDataLayout(final String versionStr, final int szIo, final int szStyle, final int szVec2, final int szVec4, final int szDrawVert, final int szDrawIdx) {
|
||||
return nDebugCheckVersionAndDataLayout(versionStr, szIo, szStyle, szVec2, szVec4, szDrawVert, szDrawIdx);
|
||||
|
||||
@@ -109,7 +109,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public ImVec2 getDisplaySize() {
|
||||
final ImVec2 dst = new ImVec2();
|
||||
@@ -118,35 +118,35 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
}
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public float getDisplaySizeX() {
|
||||
return nGetDisplaySizeX();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public float getDisplaySizeY() {
|
||||
return nGetDisplaySizeY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public void getDisplaySize(final ImVec2 dst) {
|
||||
nGetDisplaySize(dst);
|
||||
}
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public void setDisplaySize(final ImVec2 value) {
|
||||
nSetDisplaySize(value.x, value.y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size})
|
||||
* Main display size, in pixels (generally == {@code GetMainViewport()->Size}). May change every frame.
|
||||
*/
|
||||
public void setDisplaySize(final float valueX, final float valueY) {
|
||||
nSetDisplaySize(valueX, valueY);
|
||||
@@ -170,14 +170,14 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Time elapsed since last frame, in seconds.
|
||||
* Time elapsed since last frame, in seconds. May change every frame.
|
||||
*/
|
||||
public float getDeltaTime() {
|
||||
return nGetDeltaTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Time elapsed since last frame, in seconds.
|
||||
* Time elapsed since last frame, in seconds. May change every frame.
|
||||
*/
|
||||
public void setDeltaTime(final float value) {
|
||||
nSetDeltaTime(value);
|
||||
@@ -1083,6 +1083,39 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
if (str != NULL) env->ReleaseStringUTFChars(obj_str, str);
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Optional] Specify index for legacy {@code <1.87} IsKeyXXX() functions with native indices + specify native keycode, scancode.
|
||||
*/
|
||||
public void setKeyEventNativeData(final int key, final int nativeKeycode, final int nativeScancode) {
|
||||
nSetKeyEventNativeData(key, nativeKeycode, nativeScancode);
|
||||
}
|
||||
|
||||
/**
|
||||
* [Optional] Specify index for legacy {@code <1.87} IsKeyXXX() functions with native indices + specify native keycode, scancode.
|
||||
*/
|
||||
public void setKeyEventNativeData(final int key, final int nativeKeycode, final int nativeScancode, final int nativeLegacyIndex) {
|
||||
nSetKeyEventNativeData(key, nativeKeycode, nativeScancode, nativeLegacyIndex);
|
||||
}
|
||||
|
||||
private native void nSetKeyEventNativeData(int key, int nativeKeycode, int nativeScancode); /*
|
||||
THIS->SetKeyEventNativeData(static_cast<ImGuiKey>(key), nativeKeycode, nativeScancode);
|
||||
*/
|
||||
|
||||
private native void nSetKeyEventNativeData(int key, int nativeKeycode, int nativeScancode, int nativeLegacyIndex); /*
|
||||
THIS->SetKeyEventNativeData(static_cast<ImGuiKey>(key), nativeKeycode, nativeScancode, nativeLegacyIndex);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog boxes that are interrupting your application loop/refresh, and you want to disable events being queued while your app is frozen.
|
||||
*/
|
||||
public void setAppAcceptingEvents(final boolean acceptingEvents) {
|
||||
nSetAppAcceptingEvents(acceptingEvents);
|
||||
}
|
||||
|
||||
private native void nSetAppAcceptingEvents(boolean acceptingEvents); /*
|
||||
THIS->SetAppAcceptingEvents(acceptingEvents);
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Internal] Clear the text input buffer manually
|
||||
*/
|
||||
@@ -1105,28 +1138,6 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
THIS->ClearInputKeys();
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Optional] Specify index for legacy before 1.87 IsKeyXXX() functions with native indices + specify native keycode, scancode.
|
||||
*/
|
||||
public void setKeyEventNativeData(final int key, final int nativeKeycode, final int nativeScancode) {
|
||||
nSetKeyEventNativeData(key, nativeKeycode, nativeScancode);
|
||||
}
|
||||
|
||||
/**
|
||||
* [Optional] Specify index for legacy before 1.87 IsKeyXXX() functions with native indices + specify native keycode, scancode.
|
||||
*/
|
||||
public void setKeyEventNativeData(final int key, final int nativeKeycode, final int nativeScancode, final int nativeLegacyIndex) {
|
||||
nSetKeyEventNativeData(key, nativeKeycode, nativeScancode, nativeLegacyIndex);
|
||||
}
|
||||
|
||||
private native void nSetKeyEventNativeData(int key, int nativeKeycode, int nativeScancode); /*
|
||||
THIS->SetKeyEventNativeData(static_cast<ImGuiKey>(key), nativeKeycode, nativeScancode);
|
||||
*/
|
||||
|
||||
private native void nSetKeyEventNativeData(int key, int nativeKeycode, int nativeScancode, int nativeLegacyIndex); /*
|
||||
THIS->SetKeyEventNativeData(static_cast<ImGuiKey>(key), nativeKeycode, nativeScancode, nativeLegacyIndex);
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Output - Updated by NewFrame() or EndFrame()/Render()
|
||||
// (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
|
||||
@@ -1556,6 +1567,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
/**
|
||||
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
||||
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean[] getKeysDown() {
|
||||
@@ -1564,6 +1576,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
/**
|
||||
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
||||
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getKeysDown(final int idx) {
|
||||
@@ -1572,6 +1585,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
/**
|
||||
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
||||
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setKeysDown(final boolean[] value) {
|
||||
@@ -1580,6 +1594,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
/**
|
||||
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
||||
* This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setKeysDown(final int idx, final boolean value) {
|
||||
@@ -1588,11 +1603,11 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
@Deprecated
|
||||
private native boolean[] nGetKeysDown(); /*
|
||||
jboolean jBuf[512];
|
||||
for (int i = 0; i < 512; i++)
|
||||
jboolean jBuf[ImGuiKey_COUNT];
|
||||
for (int i = 0; i < ImGuiKey_COUNT; i++)
|
||||
jBuf[i] = THIS->KeysDown[i];
|
||||
jbooleanArray result = env->NewBooleanArray(512);
|
||||
env->SetBooleanArrayRegion(result, 0, 512, jBuf);
|
||||
jbooleanArray result = env->NewBooleanArray(ImGuiKey_COUNT);
|
||||
env->SetBooleanArrayRegion(result, 0, ImGuiKey_COUNT, jBuf);
|
||||
return result;
|
||||
*/
|
||||
|
||||
@@ -1603,7 +1618,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
|
||||
@Deprecated
|
||||
private native void nSetKeysDown(boolean[] value); /*
|
||||
for (int i = 0; i < 512; i++)
|
||||
for (int i = 0; i < ImGuiKey_COUNT; i++)
|
||||
THIS->KeysDown[i] = value[i];
|
||||
*/
|
||||
|
||||
@@ -1963,28 +1978,6 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
THIS->KeyMods = value;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Key mods flags (from previous frame)
|
||||
*/
|
||||
public int getKeyModsPrev() {
|
||||
return nGetKeyModsPrev();
|
||||
}
|
||||
|
||||
/**
|
||||
* Key mods flags (from previous frame)
|
||||
*/
|
||||
public void setKeyModsPrev(final int value) {
|
||||
nSetKeyModsPrev(value);
|
||||
}
|
||||
|
||||
private native int nGetKeyModsPrev(); /*
|
||||
return THIS->KeyModsPrev;
|
||||
*/
|
||||
|
||||
private native void nSetKeyModsPrev(int value); /*
|
||||
THIS->KeyModsPrev = value;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Key state for all known keys. Use IsKeyXXX() functions to access this.
|
||||
*/
|
||||
@@ -2782,20 +2775,26 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
THIS->PenPressure = value;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Only modify via AddFocusEvent().
|
||||
*/
|
||||
public boolean getAppFocusLost() {
|
||||
return nGetAppFocusLost();
|
||||
}
|
||||
|
||||
public void setAppFocusLost(final boolean value) {
|
||||
nSetAppFocusLost(value);
|
||||
}
|
||||
|
||||
private native boolean nGetAppFocusLost(); /*
|
||||
return THIS->AppFocusLost;
|
||||
*/
|
||||
|
||||
private native void nSetAppFocusLost(boolean value); /*
|
||||
THIS->AppFocusLost = value;
|
||||
/**
|
||||
* Only modify via SetAppAcceptingEvents().
|
||||
*/
|
||||
public boolean getAppAcceptingEvents() {
|
||||
return nGetAppAcceptingEvents();
|
||||
}
|
||||
|
||||
private native boolean nGetAppAcceptingEvents(); /*
|
||||
return THIS->AppAcceptingEvents;
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1314,7 +1314,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
|
||||
|
||||
/**
|
||||
* Enable anti-aliased lines/borders using textures where possible.
|
||||
* Require backend to render with bilinear filtering.
|
||||
* Require backend to render with bilinear filtering (NOT point/nearest filtering).
|
||||
* Latched at the beginning of the frame (copied to ImDrawList).
|
||||
*/
|
||||
public boolean getAntiAliasedLinesUseTex() {
|
||||
@@ -1323,7 +1323,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
|
||||
|
||||
/**
|
||||
* Enable anti-aliased lines/borders using textures where possible.
|
||||
* Require backend to render with bilinear filtering.
|
||||
* Require backend to render with bilinear filtering (NOT point/nearest filtering).
|
||||
* Latched at the beginning of the frame (copied to ImDrawList).
|
||||
*/
|
||||
public void setAntiAliasedLinesUseTex(final boolean value) {
|
||||
|
||||
@@ -65,6 +65,21 @@ public final class Operation {
|
||||
*/
|
||||
public static final int BOUNDS = 1024;
|
||||
|
||||
/**
|
||||
* Definition: {@code (1u << 11)}
|
||||
*/
|
||||
public static final int SCALE_XU = 2048;
|
||||
|
||||
/**
|
||||
* Definition: {@code (1u << 12)}
|
||||
*/
|
||||
public static final int SCALE_YU = 4096;
|
||||
|
||||
/**
|
||||
* Definition: {@code (1u << 13)}
|
||||
*/
|
||||
public static final int SCALE_ZU = 8192;
|
||||
|
||||
/**
|
||||
* Definition: {@code TRANSLATE_X | TRANSLATE_Y | TRANSLATE_Z}
|
||||
*/
|
||||
@@ -79,4 +94,16 @@ public final class Operation {
|
||||
* Definition: {@code SCALE_X | SCALE_Y | SCALE_Z}
|
||||
*/
|
||||
public static final int SCALE = 896;
|
||||
|
||||
/**
|
||||
* universal
|
||||
*
|
||||
* <p>Definition: {@code SCALE_XU | SCALE_YU | SCALE_ZU}
|
||||
*/
|
||||
public static final int SCALEU = 14336;
|
||||
|
||||
/**
|
||||
* Definition: {@code TRANSLATE | ROTATE | SCALEU}
|
||||
*/
|
||||
public static final int UNIVERSAL = 14463;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public final class ImDrawListFlags {
|
||||
public static final int AntiAliasedLines = 1;
|
||||
|
||||
/**
|
||||
* Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering.
|
||||
* Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering).
|
||||
*
|
||||
* <p>Definition: {@code 1 << 1}
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ public final class ImFontAtlasFlags {
|
||||
public static final int NoMouseCursors = 2;
|
||||
|
||||
/**
|
||||
* Don't build thick line textures into the atlas (save a little texture memory). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered using polygons (more expensive for CPU/GPU).
|
||||
* Don't build thick line textures into the atlas (save a little texture memory, allow support for point/nearest filtering). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered using polygons (more expensive for CPU/GPU).
|
||||
*
|
||||
* <p>Definition: {@code 1 << 2}
|
||||
*/
|
||||
|
||||
@@ -83,12 +83,18 @@ public final class ImGuiCol {
|
||||
|
||||
public static final int SeparatorActive = 29;
|
||||
|
||||
/**
|
||||
* Resize grip in lower-right and lower-left corners of windows.
|
||||
*/
|
||||
public static final int ResizeGrip = 30;
|
||||
|
||||
public static final int ResizeGripHovered = 31;
|
||||
|
||||
public static final int ResizeGripActive = 32;
|
||||
|
||||
/**
|
||||
* TabItem in a TabBar
|
||||
*/
|
||||
public static final int Tab = 33;
|
||||
|
||||
public static final int TabHovered = 34;
|
||||
@@ -144,6 +150,9 @@ public final class ImGuiCol {
|
||||
|
||||
public static final int TextSelectedBg = 49;
|
||||
|
||||
/**
|
||||
* Rectangle highlighting a drop target
|
||||
*/
|
||||
public static final int DragDropTarget = 50;
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,6 +80,13 @@ public final class ImGuiHoveredFlags {
|
||||
*/
|
||||
public static final int AllowWhenDisabled = 512;
|
||||
|
||||
/**
|
||||
* Disable using gamepad/keyboard navigation state when active, always query mouse.
|
||||
*
|
||||
* <p>Definition: {@code 1 << 10}
|
||||
*/
|
||||
public static final int NoNavOverride = 1024;
|
||||
|
||||
/**
|
||||
* Definition: {@code ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped}
|
||||
*/
|
||||
|
||||
@@ -384,22 +384,22 @@ public final class ImGuiKey {
|
||||
public static final int GamepadRStickRight = 640;
|
||||
|
||||
/**
|
||||
* Keyboard Modifiers - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
*/
|
||||
public static final int ModCtrl = 641;
|
||||
|
||||
/**
|
||||
* Keyboard Modifiers - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
*/
|
||||
public static final int ModShift = 642;
|
||||
|
||||
/**
|
||||
* Keyboard Modifiers - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
*/
|
||||
public static final int ModAlt = 643;
|
||||
|
||||
/**
|
||||
* Keyboard Modifiers - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
* Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) - This is mirroring the data also written to io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper, in a format allowing them to be accessed via standard key API, allowing calls such as IsKeyPressed(), IsKeyReleased(), querying duration etc. - Code polling every keys (e.g. an interface to detect a key press for input mapping) might want to ignore those and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiKey_ModCtrl). - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user...
|
||||
*/
|
||||
public static final int ModSuper = 644;
|
||||
|
||||
@@ -437,7 +437,7 @@ public final class ImGuiKey {
|
||||
public static final int KeysData_SIZE = 645;
|
||||
|
||||
/**
|
||||
* First key stored in KeysData[0]
|
||||
* First key stored in io.KeysData[0]. Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET).
|
||||
*
|
||||
* <p>Definition: {@code 0}
|
||||
*/
|
||||
|
||||
+5
-3
@@ -4,8 +4,8 @@ package imgui.flag;
|
||||
/**
|
||||
* To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
|
||||
*/
|
||||
public final class ImGuiKeyModFlags {
|
||||
private ImGuiKeyModFlags() {
|
||||
public final class ImGuiModFlags {
|
||||
private ImGuiModFlags() {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,9 @@ public final class ImGuiKeyModFlags {
|
||||
public static final int Shift = 2;
|
||||
|
||||
/**
|
||||
* Definition: {@code 1 << 2}
|
||||
* Menu
|
||||
*
|
||||
* <p>Definition: {@code 1 << 2}
|
||||
*/
|
||||
public static final int Alt = 4;
|
||||
|
||||
@@ -3,6 +3,7 @@ package imgui.flag;
|
||||
|
||||
/**
|
||||
* Gamepad/Keyboard directional navigation
|
||||
* Since {@code >=1.87} backends you generally don't need to care about this enum since io.NavInputs[] is setup automatically. This might become private/internal some day.
|
||||
* Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable.
|
||||
* NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
|
||||
* Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
|
||||
|
||||
@@ -363,20 +363,20 @@ public final class ImGui extends imgui.ImGui {
|
||||
|
||||
// Init
|
||||
|
||||
public static void initialize(final ImGuiContext context) {
|
||||
nInitialize(context.ptr);
|
||||
public static void initialize() {
|
||||
nInitialize();
|
||||
}
|
||||
|
||||
private static native void nInitialize(long context); /*
|
||||
ImGui::Initialize(reinterpret_cast<ImGuiContext*>(context));
|
||||
private static native void nInitialize(); /*
|
||||
ImGui::Initialize();
|
||||
*/
|
||||
|
||||
public static void shutdown(final ImGuiContext context) {
|
||||
nShutdown(context.ptr);
|
||||
public static void shutdown() {
|
||||
nShutdown();
|
||||
}
|
||||
|
||||
private static native void nShutdown(long context); /*
|
||||
ImGui::Shutdown(reinterpret_cast<ImGuiContext*>(context));
|
||||
private static native void nShutdown(); /*
|
||||
ImGui::Shutdown();
|
||||
*/
|
||||
|
||||
// NewFrame
|
||||
|
||||
Reference in new issue
Block a user