Repository navigation
feat(ui): port the Caramel UI pack launcher and its in-game Mod Menu - #185
Merged
Merged
Conversation
… 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.
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
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
MainActivityhosts a singleComposeView;CaramelLauncherHostis the Java-facing seam (the activity supplies theActions, the Kotlin side supplies the frame).ui/compose/caramel/.Versions,ExampleModsandExampleServersfor its demo; those are not carried over.CaramelLauncherStatedefaults every list to empty and the activity fills it fromVersionManager,MsftAccountStoreandModManager, 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
sweetloader,pl::menu— submodule PR feat(menu): restore the in-game ImGui Mod Menu from the UI pack SweetLoader#40).InGameMenuControlleris 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.PreloaderMenuis the JNI seam and is fail-closed: with no live present hook the menu reports itself unavailable and cannot open.MinecraftActivitystarts the controller with the session, gives the open menu first refusal on every touch, and drains its events each tick.Submodule
Bumps
app/src/main/cpp/sweetloadertofeat/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 (restoredModUnavailableReasonResourcesTestincluded)../gradlew :app:assembleDebug— succeeds, NDK C++ included;libsweetloader.soexports theJava_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.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.