Introducing UIDragDetectors [Studio-only Beta]

DPA Consol Log 0.2.rbxm (22.3 KB)
i have ripped the whole GUI from the game. I have modified it a little but it produces the same results.
the GUI I have here has a script for the old drag system located in the textLabel, now called “Title.” disable the uidragdetector and enable that script; old working script.
The resize button on the bottom right of the window uses a modified version of the drag module and is not using the uidragdetectors (I plan on adding that too.)
uhh ig that’s it :coefficients:

Gotcha-- thank you so much! I’ll test these out as soon as possible.

Of course! You can find it below. One thing I also noted is that the issue appears more prevalent when there are more instances, such as text boxes or buttons, inside the UI or instance that the drag detector is inside.

issue_ui.rbxm (6.9 KB)

Adding onto this, for dragging frames around the screen, would there be a way to prevent frames from going off screen even if it is just by half, for example? I attempted to use the drag space feature to try and limit the frame to being just inside of the screen but it didn’t work…

Since the changed position from using the drag detector is represented using pixel offset, how would we be able to set positions for the handle? I don’t really see how I’d be able to predict the start and end point since everyone’s screen sizes are different. I left a reply earlier but haven’t had an answer yet

Another error, and that is that I used this for my Plugin interface, when opening the plugin file, I cannot use the UIDrag and if I use plugin:Activate(true) it will not allow me to use them until it is deactivated. The only solution for the first problem was to press the model selector and deselect it again.

Yes! You can set the BoundingUI property as the screenGui to prevent it from being dragged outside of the bounds.

As for just dragging it outside by half, I’ll have to think about a way to do that.

You should be able to drag in a scale mode-- are there issues that you’re running into with that?

At the moment, there is a hard lock on not being able to use this when a plugin is active. We should be able to scale that back to disabling it when a tool or the UIEditor is active-- we will update this thread when that change goes through.

This was initially done to prevent the UIDragDetector from being activated in edit mode when you use a plugin that wants to interact with that UI.

2 Likes

I’ll have to figure that out, it may be an issue with me setting them up wrong as I was mainly copying settings from the example place, my mistake !

Update on September 5th:

  • Fixed a bug where a GuiObject’s MouseEnter, MouseLeave, MouseMoved, MouseWheelForward and MouseWheelBackward would not fire properly while you dragged a GuiObject with a UIDragDetector.
  • Fixed a bug where setting the DragAxis property to (0, 0) would set it to (nan, nan).
  • Fixed a bug where the touch indicator on mobile would be in the incorrect position when dragging on a SurfaceGui.
  • Fixed a bug where dragging outside the bounds of a SurfaceGui on mobile and releasing would leave the UIDragDetector non-interactable.
  • Fixed a bug with the CursorIcon and ActivatedCursorIcon where it wouldn’t properly change when moving between multiple GuiObjects.

These changes will be effective for versions 640 and beyond. Please let us know if these issues persist.

Have you found anything with the window problem yet?

I have a few bugs that I need to tackle first, but I’m hoping to get to it sometime next week :sob:

https://gyazo.com/9be08e15b25f4f4c6fd022bff4738532
:smiley: Super useful

1 Like

Is it possible to only make a certain area of an instance draggable?

I currently have a Frame and its children, and the entire Frame is draggable. However, I only want like the top 10% of the Frame to be draggable.

I’ve tried creating a “dragger” as a child of the Frame, but then the other children (which are now the dragger’s siblings) don’t get dragged with it.

Hi, If I publish a studio plugin using UIDragDetector will it work for people or will they have to enable beta feature?

Is this timeline the same or has it been pushed back? Wondering if I should start migrating some UI components.

isnt this already added? t t t

These UIDragDetectors don’t drag all the way, they’re like a pixel off. In fact, I proved this by testing Roblox’s own example slider.

If you check the Handle’s position property you’ll see it never hits the scale of 1, nor does it hit 0. You can see the issue visually represented clearly in these videos:

Is this flagged as an issue?

3 Likes

man i wish it would come out of studio-only rn

2 Likes