[API] Add ImGuiPlatformMonitor

This commit is contained in:
SpaiR committed 2020-08-30 23:04:05 +03:00
1 parent b065d004f7
commit 13c3a28f09
3 files changed
+165

No files matched your search

@@ -72,6 +72,7 @@ import imgui.callback.ImPlatformFuncViewportSuppImVec2;
public final class ImGuiPlatformIO extends ImGuiStruct {
private static final ImGuiViewport MAIN_VIEWPORT = new ImGuiViewport(0);
private static final ImGuiViewport TMP_VIEWPORT = new ImGuiViewport(0);
private static final ImGuiPlatformMonitor TMP_MONITOR = new ImGuiPlatformMonitor(0);
private static final ImVec2 TMP_IM_VEC2 = new ImVec2();
public ImGuiPlatformIO(final long ptr) {
@@ -517,6 +518,15 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
IMGUI_PLATFORM_IO->Monitors.push_back(monitor);
*/
public ImGuiPlatformMonitor getMonitors(final int idx) {
TMP_MONITOR.ptr = nGetMonitors(idx);
return TMP_MONITOR;
}
private native long nGetMonitors(int idx); /*
return (intptr_t)&IMGUI_PLATFORM_IO->Monitors[idx];
*/
// Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::Render)
// (in the future we will attempt to organize this feature to remove the need for a "main viewport")