Repository navigation
feat(menu): native ImGui mod menu and present-frame effects - #38
Merged
Merged
Conversation
…pack theme The in-game Mod Menu is drawn by Dear ImGui on the game's own GL context through the present hook. CaramelTheme/CaramelWidgets from the Caramel UI pack are ported into pl/menu as MenuTheme/MenuWidgets, so the launcher and the in-game menu share one design language. Adds the two present-frame effects (frame generation, motion blur) on the eglSwapBuffers detour: both blend the previous presented frame into the new one, neither presents an extra frame, and the blur budget is clamped.
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 changed
Adds the in-game Mod Menu (Dear ImGui on the game's own GL context) and the two present-frame
effects, and vendors Dear ImGui so the build never needs the network.
pl/menu/— the native ImGui menuMenuTheme.*andMenuWidgets.*are the Caramel UI pack'simgui/src/CaramelTheme.*andCaramelWidgets.*ported token for token, so the launcher and the in-game menu share one designlanguage.
MenuHostlazily creates the ImGui context on the first present where the seam is live andpumps the frame from the present hook;
MenuRenderdraws the header, tab bar and pages;MenuJniis the Java bridge (
org.chimeramc.client.preloader.PreloaderMenu);MenuFilterandMenuTypes.hpphold the filter rule and data types and stay ImGui-free so the host tests can exercise them.
The GLFW desktop backend the pack ships is not wired: Android has no windowing stack, so the menu
draws through the game's GL context (
imgui_impl_opengl3only).pl/render/— present-frame effectsPresentFrameEffecthooks the present / frame-boundary seam (eglSwapBuffersdetour) and blendsthe previous presented frame into the new one.
PresentFrameMath.hppis the pure, host-testableblend + budget clamp. Two effects ride it:
presented.
Both are badged while the present hook is absent, and neither claims a frame-rate gain.
Vendored Dear ImGui
third_party/imgui/(1.91.5 + theimgui_impl_opengl3backend) is vendored rather than fetched,because the build must not depend on the network at configure time.
NOTICEattributes it andscripts/check_pinned_deps.pystill passes.Verification
tests/cosmetics/run_tests.sh— all host tests pass, including the newPresentFrameMathTestand
MenuFilterTest.scripts/check_sources_listed.py,scripts/check_pinned_deps.py— pass.