[API] Make ImGuiIO to extend common ImGuiStruct class
ImGuiIO used a legacy way to access the native struct through `ImGui::GetIO()`. Refactored to use ImGuiStruct, so to make API consistent.
This commit is contained in:
1 parent
91d636a659
commit
fb80b8d8a1
2 files changed
+158
-148
No files matched your search
@@ -53,7 +53,7 @@ public class ImGui {
|
||||
System.loadLibrary(libName);
|
||||
}
|
||||
|
||||
IMGUI_IO = new ImGuiIO();
|
||||
IMGUI_IO = new ImGuiIO(0);
|
||||
WINDOW_DRAW_LIST = new ImDrawList(0);
|
||||
BACKGROUND_DRAW_LIST = new ImDrawList(0);
|
||||
FOREGROUND_DRAW_LIST = new ImDrawList(0);
|
||||
@@ -163,9 +163,14 @@ public class ImGui {
|
||||
* Access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags).
|
||||
*/
|
||||
public static ImGuiIO getIO() {
|
||||
IMGUI_IO.ptr = nGetIO();
|
||||
return IMGUI_IO;
|
||||
}
|
||||
|
||||
private static native long nGetIO(); /*
|
||||
return (intptr_t)&ImGui::GetIO();
|
||||
*/
|
||||
|
||||
/**
|
||||
* Access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame!
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user