Skip to content

feat(ui): port the Caramel UI pack launcher and its in-game Mod Menu - #185

Merged
Lynxifyy merged 1 commit into
mainfrom
feat/port-caramel-ui-pack
Nov 14, 2026
Merged

Lynxifyy merged 1 commit into
mainfrom
feat/port-caramel-ui-pack

Conversation

@Lynxifyy

@Lynxifyy Lynxifyy commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

The legacy launcher UI was deleted in #184 so the app could become a clean skeleton. This puts a real UI back: the Caramel UI pack's Compose launcher, wired to the managers that survived the deletion, plus the pack's in-game Mod Menu as a native overlay.

The pack: https://github.com/Lynxifyy/CaramelClient-UI-pack.

The launcher

  • MainActivity hosts a single ComposeView; CaramelLauncherHost is the Java-facing seam (the activity supplies the Actions, the Kotlin side supplies the frame).
  • The pack's frame, glass title bar, 56dp sidebar rail and six tabs (Home, Mods, Servers, Cosmetics, News, Store) are ported under ui/compose/caramel/.
  • Every row is real data. The pack ships Versions, ExampleMods and ExampleServers for its demo; those are not carried over. CaramelLauncherState defaults every list to empty and the activity fills it from VersionManager, MsftAccountStore and ModManager, so a screen with nothing to show draws its empty state rather than a fabricated row. The Store tab has no backend, so it says so.

The in-game Mod Menu

  • The menu the launcher opens is the pack's Dear ImGui menu, restored as a native overlay drawn on the game's GL context (sweetloader, pl::menu — submodule PR feat(menu): restore the in-game ImGui Mod Menu from the UI pack SweetLoader#40).
  • InGameMenuController is the bridge: it builds the module catalogue from the same providers the launcher uses, forwards touch and the back button into the menu, and applies the events it raises onto the real modules on the main thread.
  • PreloaderMenu is the JNI seam and is fail-closed: with no live present hook the menu reports itself unavailable and cannot open.
  • MinecraftActivity starts the controller with the session, gives the open menu first refusal on every touch, and drains its events each tick.
  • The panel draws straight over the game — no full-screen dim scrim — and the host skips the whole ImGui frame while the menu is closed.

Submodule

Bumps app/src/main/cpp/sweetloader to feat/restore-pack-menu (ChimeraAnt-DEV/SweetLoader#40). Merge that first, or merge this with the submodule commit reachable.

Verification

  • ./gradlew :app:testDebugUnitTest — 3167 tests, 0 failures (restored ModUnavailableReasonResourcesTest included).
  • ./gradlew :app:assembleDebug — succeeds, NDK C++ included; libsweetloader.so exports the Java_org_chimeramc_client_preloader_PreloaderMenu_* symbols.
  • ./gradlew :app:lintDebug, scripts/check_ui_hygiene.py, scripts/validate_release_content.py, scripts/check_submodules.sh, scripts/verify_berryapi_abi.py — all clean.
  • Native host suite sweetloader/tests/cosmetics/run_tests.sh — green.

Note: there is no device or emulator in this environment, so the on-device look of the Compose launcher and the native menu is not measured here.


… Mod Menu

The legacy launcher UI was deleted so the app could become a clean skeleton.
This puts a real UI back: the Caramel UI pack's Compose launcher, wired to the
managers that survived the deletion.

The launcher
------------
MainActivity hosts a single ComposeView; CaramelLauncherHost is the Java-facing
seam (the activity supplies the Actions, the Kotlin side supplies the frame).
The pack's frame, glass title bar, 56dp sidebar rail and six tabs (Home, Mods,
Servers, Cosmetics, News, Store) are ported under ui/compose/caramel.

Every row is real data. The pack ships Versions, ExampleMods and ExampleServers
for its demo; those are not carried over. CaramelLauncherState defaults every
list to empty and the activity fills it from VersionManager, MsftAccountStore
and ModManager, so a screen with nothing to show draws its empty state rather
than a fabricated row. The Store tab has no backend, so it says so.

The in-game Mod Menu
--------------------
The menu the launcher opens is the pack's Dear ImGui menu, restored as a native
overlay drawn on the game's GL context (sweetloader, pl::menu). InGameMenuController
is the bridge: it builds the module catalogue from the same providers the
launcher uses, forwards touch and the back button into the menu, and applies the
events it raises onto the real modules on the main thread. PreloaderMenu is the
JNI seam and is fail-closed: with no live present hook the menu reports itself
unavailable and cannot open.

MinecraftActivity starts the controller with the session, gives the open menu
first refusal on every touch, and drains its events each tick.
@Lynxifyy
Lynxifyy marked this pull request as ready for review November 14, 2026 22:42
@Lynxifyy
Lynxifyy merged commit 962cc4b into main Nov 14, 2026
5 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