Introducing UIDragDetectors [Studio-only Beta]

Updates on October 17th, 2024:

  • UI Selection Mode (Mode activated by \ on keyboard) now works with UIDragDetectors! GuiObject instances with an enabled UIDragDetector will automatically be selectable with navigation in this mode. Note that there are some issues that exist with absolute DragRelativity settings in this mode at the moment.
  • UIDragDetectors are now only disabled when a tool or the UIEditor plugin is active-- other plugin activation will not interfere with dragging.
  • Changing Min/Max DragTranslation during drag functions properly.
  • Screen insets are taken into account properly with Min/Max DragTranslation.

As for enabling the feature on engine-- expect exciting news within the next couple days! It takes a couple weeks for new updates to be fully available on mobile devices, but we are looking into ways to make it available for the client on other platforms earlier.

1 Like

Good to hear! Are there any updates on layout support and the slider issue fix I mentioned a while ago?

Also, will the built-in backpack be updated to use this instance, rather than the outdated draggable property?

Wondering if it will be possible to drag items that are constrained by a UIList or UIGrid soon, this new system would be perfect for my custom backpack.

No existing plugins are used to use this instance, unfortunately.

I believe the slider not reaching the edges should be somewhat improved with the rounding changes, and if it was jumping up, that definitely was fixed. Any other inaccuracies, we will be iterating and improving upon.

No additional support for layouts are concrete yet, unfortunately.

Hello creators,

We are excited to announce that we are taking sign-ups to enable UIDragDetectors on select places!

Simply fill out the form below– we will enable it on the places requested every morning in Pacific Time during business days.

This sign-up enables the feature on PC and Mac clients only– mobile devices won’t receive the feature until a future date when we can turn the feature on safely for mobile devices, which we expect would be in 1-2 weeks.

Please carefully read the acknowledgements in the form.

To opt-out after you signed up, DM me and I will process it the next business day.

Sign-up link: Roblox Betas | UIDragDetector Beta for Places Sign-Up

11 Likes

Also with further testing I realized you also cant use MouseButton1Click, with an icon that has a drag detector, will there be any possible way to differentiate between a player dragging a UI element and just clicking it

Just submitted the form, Love to test mess around with UIDragDetectors in game.

I believe in this case, you could put on-click logic in DragStart– or have the UIDragDetector be disabled somehow if you want click signal behaviors.

If the drag is rejected for some reason (clicking outside bounding UI area, UIDragDetector is disabled, or some other reason), it would fire the signals normally.

Perhaps you could have logic that disables it on dragStart if conditions are met, then re-enable immediately? The disabling would trigger a termination of the drag and thus no further behavior, and you could run whatever on-click logic you wish without drags happening. Re-enabling immediately would allow future interactions to work with the UIDragDetector after the click (Or I suppose you could hook up re-enabling to mouseUp)

I went ahead and tried testing each method you stated but I dont think they are as effective in the outcome I was trying to reach. I believe having a UIDragDetector in a ImageButton or TextButton, simply overrides the built in function MouseButton1Click for those instances.

I will continue to search for any solutions but overall I really like the new system, I do have one method that came to mind that I havent tried yet, which is using mouseEnter/mouseLeave to determine if the player is hovering an Icon, and then determining mouseClicked from there.

I will keep you posted.

Ah yes, that behavior was intended to ensure we can have UIDragDetectors work for interactive GuiObjects, such as TextButton, ImageButton, TextBox, or a ScrollingFrame.

Having an enabled UIDragDetector under it overrides and disables the native interaction behavior with them.

Disabling the UIDragDetector will resume normal behavior.

You’d need a way to somehow toggle between the states to drag / click it as you wish, or have the UIDragDetector belong to a parent wrapper around the interactive button to separate the interaction / dragging areas.

1 Like

First round of enabling the feature will go through on Monday! Please be aware that this will happen at around 10~11AM PST and prepare your places accordingly.

2 Likes