Repository navigation
feat(menu): restore the in-game ImGui Mod Menu from the UI pack - #40
Merged
Merged
Conversation
The in-game Mod Menu was removed with the legacy shell so the app could become a clean skeleton. The launcher side is now the Caramel UI pack's Compose UI, and the menu it opens is the pack's Dear ImGui menu, restored here as a native overlay drawn on the game's own GL context. The pack ships the menu as a renderer-agnostic library plus a GLFW desktop backend. GLFW has no Android path, so only the renderer-agnostic half is used and the backend is the GLES3 one the game's context already satisfies. Dear ImGui 1.91.5 is vendored (third_party/imgui) rather than fetched: the network is not available to a normal Android build and the revision must be pinned for a reproducible binary. The menu draws from the present hook (pl::render::OnPresentBoundary), before the present-frame effects, so its ImGui frame lands in the back buffer the engine is about to present. The panel draws straight over the game: there is no full-screen dim scrim. While the menu is closed the host skips the whole ImGui frame, which is the common case. The Java side reaches it through pl::menu's JNI (MenuJni.cpp).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Restores the in-game Dear ImGui Mod Menu that was removed with the legacy shell, as a native overlay drawn on the game's own GL context.
The menu is the one the UI pack (Lynxifyy/CaramelClient-UI-pack) ships as
imgui/src/CaramelMenu.*. The pack also ships a GLFW desktop backend; GLFW has no Android path, so only the renderer-agnostic half of the pack is used, and the backend is the GLES3 one the game's context already satisfies.How
src/pl/menu/—MenuHost(lifecycle + input queue),MenuRender,MenuWidgets,MenuTheme,MenuFilter,MenuTypes, andMenuJni(the JNI seam the launcher reaches).third_party/imgui/— Dear ImGui 1.91.5 vendored, notFetchContent'd: a normal Android build has no network and the revision must be pinned for a reproducible binary. Attribution added toNOTICE.src/pl/render/PresentFrameEffect.cpp— the menu draws from the present hook (pl::render::OnPresentBoundary), before the present-frame effects, so its ImGui frame lands in the back buffer the engine is about to present.tests/cosmetics/MenuFilterTest.cpp— the filter rule is pure, and a silently missing module looks the same as one never registered, so it is pinned on the host.Notes
Verification
bash tests/cosmetics/run_tests.sh— all host tests pass, includingMenuFilterTest: all assertions passed../gradlew :app:assembleDebugsucceeds andlibsweetloader.soexports theJava_org_chimeramc_client_preloader_PreloaderMenu_*symbols.