Add Malilib soft-dependency integration with dynamic hotkey Selection…#2
Open
mahirsn wants to merge 1 commit intovelolib:mainfrom
Open
Add Malilib soft-dependency integration with dynamic hotkey Selection…#2mahirsn wants to merge 1 commit intovelolib:mainfrom
mahirsn wants to merge 1 commit intovelolib:mainfrom
Conversation
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.
Description
This PR introduces full compatibility with malilib-based mods (such as Tweakeroo, Litematica, and MiniHUD), allowing their extensive hotkeys to be mapped and directly executed from the radial menu.
Since masa mods bypass the standard Vanilla KeyBinding registry, they previously couldn't be assigned to radial slices. This update resolves that via a clean, soft-dependency integration.
Key Features
Soft Dependency: malilib is implemented as an optional dependency via safe classloading/wrappers. If a user does not have malilib installed, Radial continues to function perfectly as a Vanilla-only mod with zero crashes.
Custom Selection GUI: Added a dedicated MalilibSelectionScreen to seamlessly bind malilib actions to radial slices.
Mod Tabs & Search Bar: The new UI dynamically generates top tabs for each installed masa mod. It also includes a real-time Search Bar (TextFieldWidget) to easily filter through hundreds of available hotkeys.
Direct Callback Execution: Instead of simulating Vanilla keypresses (which can be unreliable), clicking a configured radial slice now directly invokes the underlying IHotkeyCallback (via onKeyAction), ensuring perfect execution.
Testing
[x] Tested on pure Vanilla (no malilib) - works perfectly.
[x] Tested with Tweakeroo, Litematica, and MiniHUD installed.
[x] Verified the custom GUI renders correctly and the search filter updates dynamically.
[x] Verified malilib actions execute successfully in-game upon slice click.