Skip to content

feat(menu): restore the in-game ImGui Mod Menu from the UI pack - #40

Merged
Lynxifyy merged 1 commit into
mainfrom
feat/restore-pack-menu
Nov 14, 2026
Merged

Lynxifyy merged 1 commit into
mainfrom
feat/restore-pack-menu

Conversation

@Lynxifyy

@Lynxifyy Lynxifyy commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

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, and MenuJni (the JNI seam the launcher reaches).
  • third_party/imgui/ — Dear ImGui 1.91.5 vendored, not FetchContent'd: a normal Android build has no network and the revision must be pinned for a reproducible binary. Attribution added to NOTICE.
  • 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

  • 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 (the common case), and the frame delta is clamped after a long closed period.

Verification

  • bash tests/cosmetics/run_tests.sh — all host tests pass, including MenuFilterTest: all assertions passed.
  • The full Android build compiles the native tree: ./gradlew :app:assembleDebug succeeds and libsweetloader.so exports the Java_org_chimeramc_client_preloader_PreloaderMenu_* symbols.

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).
@Lynxifyy
Lynxifyy marked this pull request as ready for review November 14, 2026 22:42
@Lynxifyy
Lynxifyy merged commit cfe0424 into main Nov 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant