feat(radial): Allow open specific radial menu as root#812
Open
XCal-Dev wants to merge 3 commits into
Open
Conversation
XCal-Dev
added a commit
to XCal-Dev/overextended.github.io
that referenced
this pull request
Jul 10, 2026
Updated code examples for showing a specific radial menu. Related pull request: overextended/ox_lib#812 Signed-off-by: URRP XC <122388423+XCal-Dev@users.noreply.github.com>
Author
|
Related Docs change |
Member
|
Please try to reduce code duplication. |
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
I hope I wasn't blind and missed something obvious.
Adds lib.showRadialMenu(id), allowing a menu registered with lib.registerRadial to be opened directly as an independent root menu.
Previously, registered radial menus could only be reached by referencing them as a submenu from another radial item. This made context-specific radial menus depend on the global radial menu, even when they were intended to operate separately.
This allows resources to open their own registered radial menus without adding temporary items to, replacing, or otherwise modifying the global radial menu.
Example
Behaviour
A menu opened with lib.showRadialMenu:
Implementation
A separate rootRadial reference is used to distinguish the active root from its child menus.
This allows the existing showRadial transition and history logic to be reused while determining whether the current registered menu should be rendered as a root or submenu.
Root state and menu history are reset when:
Compatibility
This does not change the existing lib.registerRadial, lib.addRadialItem, or global radial menu APIs.
I have tested on the following.