mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 14:35:51 +01:00
Backend improvements (imgui_impl_android.h/.cpp): - Moved JNI soft-keyboard and Unicode char polling from the example into the backend. The application no longer needs any JNI boilerplate. - Added clipboard support via JNI to Android ClipboardManager. (#7259) - Added display metrics (DPI, density, refresh rate, orientation) via JNI. Used by the example to set main_scale from actual device density instead of hardcoded 2.0f. - BREAKING CHANGE: ImGui_ImplAndroid_Init() now takes additional asset_manager and native_activity parameters. See before/after in header. Example (main.cpp): - Removed ShowSoftKeyboardInput() and PollUnicodeChars() JNI helpers (~120 lines). - Removed their forward declarations and per-frame calls. - Updated Init() call to new signature. - Use ImGui_ImplAndroid_GetDisplayMetrics() for main_scale. - All other comments, EGL block, GetAssetData, APP_CMD cases unchanged. MainActivity.kt: unchanged (same 3 JNI bridge methods, now called by backend). docs/CHANGELOG.txt: Added entries for backend and example changes.
New to Dear ImGui? - Check out the Getting Started guide: https://github.com/ocornut/imgui/wiki/Getting-Started - About Backends: docs/BACKENDS.md file, or on the web: https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md - About Examples: docs/EXAMPLES.md file, or on the web: https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md Backends = Helper code to facilitate integration with platforms/graphics api (used by Examples + should be used by your app). Examples = Standalone applications showcasing integration with platforms/graphics api. A few Examples have extra README files in their respective directory, please check them too! Once Dear ImGui is running (in either examples or your own application/game/engine), run and refer to ImGui::ShowDemoWindow() in imgui_demo.cpp for the end-user API.