2021.5.25.1225 - Context Menu Item Injection system, tweaks and bugfixes
I've got one last build for you before the week break, I just wanted to get a few of the quicker to do priority issues done and out of the way. Most notably proper context menu injection! This provides a proper, efficient and stable (it won't break due to random changes) mechanism to add custom items to your context menus or even open fully custom context menus.
It's designed to be pretty flexible, allowing you to show custom items on grabbed objects, tools (might add some more things specific to this if needed later), avatars and so on, check below for details.
Also a few bugfixes and tweaks as well!
[h2]New Features:[/h2]
Added Context Menu Injection system for adding custom items (components under Radiant UI / Context Menu) (requested by @Earthmark, @Turk | Mentor Manager, @Electronus and GitHub / Patreon Priority Voting)
- Added ContextMenuItemSource, which provides desceription of a context menu item - label, color and sprite
-- Disabling this component will prevent the item from being injected
-- All the visuals are driven in realtime and will be reflected even when the menu is opened
-- Any button press and hover events are relayed to the Slot that this component is on, allowing you to use all the standard button components and events (under Common UI / Button Iteractions)
-- ButtonEnabled property will still generate the item, but it will be disabled in the context menu
- Added RootContextMenuItem, which will inject target ContextMenuItemSource into the root menu whenever opened
-- In order to inject the item, it needs to be anywhere within the user's hierarchy. It uses efficient registration mechanism, so it can be placed anywhere in the hierarchy
-- This works for held items too - e.g. you can add custom options that will appear for grabbed objects
- Added ContextMenuSubmenu for invoking fully custom context menu
-- This receives standard button press events and can be invoked either from another context menu item or any other button
-- By default it will generate items from children of a Slot (they need to have ContextMenuItemSource on them), you can optionally enable it to search whole hierarchy using SearchWholeHierarchy, but it's not recommended for performance and does not guarantee order of items
-- You can disable flick, override opening speed and also generate the items in counter clockwise order
--------------------
- Added ButtonPressEventRelay, which can relay button press events to another slot
- Added ButtonHoverEventRelay, which can relay button hover events to another slot
[h2]Tweaks:[/h2]
- Removed the Patreon badge gap for now, until we find a better solution (requested by @Karel | CEO based on feedback)
-- Currently this technically breaks some of the guidelines, but should look visually better. We're looking into some alternate solutions, but those will take a bit longer
- Merged Russian locale fixes by @Shadow Panther [RU/EN, UTC+3]
- Merged Japanese locale tweaks by @Aesc
[h2]Bugfixes:[/h2]
- Fixed internal check for value and reference types when setting up drives checking against the type of the field, rather than the value/target
- Fixed implicit color->float4 and float4->color casts not being generated in some cases
- Fixed audio clips imported from URL throwing an exception and not importing properly (found in a log from @ProbablePrime | Docs)
- Increased maximum nested depth when loading saved items and worlds, to fix cases of certain items with very deep hierarchies not being able to be loaded (reported by @Shadow Panther [RU/EN, UTC+3])
- Added extra logging for gather jobs to help diagnose gather jobs being stuck for some users
- Fixed LogiX tip spawning a node when holding an item with laser and double pressing trigger to switch to the freeform rotation mode (reported by @Snooper and Patreon Priority Voting)
- Removed collider from temporary LogiX wire when connecting nodes to prevent it from interfering with the laser (@Ukilop, @H3BO3 and @3x1t_5tyl3)

It's designed to be pretty flexible, allowing you to show custom items on grabbed objects, tools (might add some more things specific to this if needed later), avatars and so on, check below for details.
Also a few bugfixes and tweaks as well!
[h2]New Features:[/h2]
Added Context Menu Injection system for adding custom items (components under Radiant UI / Context Menu) (requested by @Earthmark, @Turk | Mentor Manager, @Electronus and GitHub / Patreon Priority Voting)
- Added ContextMenuItemSource, which provides desceription of a context menu item - label, color and sprite
-- Disabling this component will prevent the item from being injected
-- All the visuals are driven in realtime and will be reflected even when the menu is opened
-- Any button press and hover events are relayed to the Slot that this component is on, allowing you to use all the standard button components and events (under Common UI / Button Iteractions)
-- ButtonEnabled property will still generate the item, but it will be disabled in the context menu
- Added RootContextMenuItem, which will inject target ContextMenuItemSource into the root menu whenever opened
-- In order to inject the item, it needs to be anywhere within the user's hierarchy. It uses efficient registration mechanism, so it can be placed anywhere in the hierarchy
-- This works for held items too - e.g. you can add custom options that will appear for grabbed objects
- Added ContextMenuSubmenu for invoking fully custom context menu
-- This receives standard button press events and can be invoked either from another context menu item or any other button
-- By default it will generate items from children of a Slot (they need to have ContextMenuItemSource on them), you can optionally enable it to search whole hierarchy using SearchWholeHierarchy, but it's not recommended for performance and does not guarantee order of items
-- You can disable flick, override opening speed and also generate the items in counter clockwise order
--------------------
- Added ButtonPressEventRelay, which can relay button press events to another slot
- Added ButtonHoverEventRelay, which can relay button hover events to another slot
[h2]Tweaks:[/h2]
- Removed the Patreon badge gap for now, until we find a better solution (requested by @Karel | CEO based on feedback)
-- Currently this technically breaks some of the guidelines, but should look visually better. We're looking into some alternate solutions, but those will take a bit longer
- Merged Russian locale fixes by @Shadow Panther [RU/EN, UTC+3]
- Merged Japanese locale tweaks by @Aesc
[h2]Bugfixes:[/h2]
- Fixed internal check for value and reference types when setting up drives checking against the type of the field, rather than the value/target
- Fixed implicit color->float4 and float4->color casts not being generated in some cases
- Fixed audio clips imported from URL throwing an exception and not importing properly (found in a log from @ProbablePrime | Docs)
- Increased maximum nested depth when loading saved items and worlds, to fix cases of certain items with very deep hierarchies not being able to be loaded (reported by @Shadow Panther [RU/EN, UTC+3])
- Added extra logging for gather jobs to help diagnose gather jobs being stuck for some users
- Fixed LogiX tip spawning a node when holding an item with laser and double pressing trigger to switch to the freeform rotation mode (reported by @Snooper and Patreon Priority Voting)
- Removed collider from temporary LogiX wire when connecting nodes to prevent it from interfering with the laser (@Ukilop, @H3BO3 and @3x1t_5tyl3)


