Introducing UIDragDetectors [Studio-only Beta]

could you make it so you can have the drag detector detect inputs from one ui object, and move another? I wanna use this for moving windows sort of how you do on a computer by dragging the top bar. (I haven’t tested these much so if there’s already a way to do this please correct me)

Hi. I’m surprised no one has mentioned this as it seems obvious and vital but I just added one to a frame and

I immediately noticed clicking without dragging when it’s not at 0, 0 causes DragUDim2 to set to 0, 0 which then if you drag back to the real 0, 0 DragUDim2 will go negative making it really buggy and inaccurate to read from. Instead I might just read from the position of the frame for now so it’s not a total loss

Edit: Another thing I noticed is that when dragging my frame all the way to the bounds instead of ending at the min/max it clamps at 0.001 offset to the min/max. Not a huge deal but slightly annoying

Second Edit: Also when changing the ResponseStyle it should probably start by translating the position from the old UDim type rather than just offsetting more to account for it. E.g. if it’s on offset and already at a position and you switch it to scale, it just offsets the scale on top of the current offset value rather than converting the offset to scale first

What matters is the experience you gained
brain_meme

3 Likes

does UIBlur mean no more DepthOfFieldEffect or BlurEffect trickery?

2 Likes

UIBlur could mean something along the lines of having a blurred background behind frames and other GuiObjects without having to use more complicated tactics (such as DepthOfFieldEffects)

2 Likes

and UIShadow, which is self-explanatory.

Adding shadows under GUIObjects without having to use images which we currently are facing

2 Likes

This is a great update! We haven’t had such good updates for a long time Although I have to say that there is still a long way to go. Especially on mobile devices there are big problems with this feature I can’t wait until this is all resolved. Very nice!

i feel you, roblox recently published a feature that made part of my plugin obsolete xD
still it’s great that we have a native solution for this now :smiley:

oh that’s a great idea, that’d be awesome

I like the engine ui thing though

2 Likes

after making a ui drag system many times they finally add it

For anyone who needs an icon for the activated dragger, here:

DragNoBlur
Borders + No Blur

Drag
Borders + Blur

Drag_NoBorders_NoBlur
No Borders + No Blur

Drag_NoBorders_Blur
No Borders + Blur

I recommend the borders + blur, i personally use it, it’s nice.

5 Likes

super cool feature rare roblox w

1 Like

Here’s a bug that I’ve found when trying to create a slider similar to the first example on the documentation. When setting the UIDragDetector’s parent, (the handle) to have an anchor position of (0.5, 0.5) and setting the max and min DragTranslations to 0 on their Y axis Scale. Dragging the handle will cause the handle to come off the parent frame. My goal in this scenario is to reduce the Minimum Drag translation to its current dragTranslation so that the player is only able to move the handle forward and not backward. This maybe due to the anchor I set which is necessary in my case as I want to give the handle an enlarging effect. I’ll upload a simple example of the issue below.
dragBug.rbxm (6.0 KB)

Is the cursor supposed to rotate when you hover over draggable elements? This is incredibly annoying.

Another bug with the UIDragDetectors is that if there is one Frame with a UIDragDetector and you clone the frame multiple times, once you do clonedFrame.UIDragDetector.Enabled = false on any of the cloned frames it will switch the rest of the UIDragDetectors to false that come after it regardless of the original frame having it set to enabled.

FINALLY :face_holding_back_tears:

Words cannot describe how amazing this is. This will trivialize:

  • Color wheels
  • Bar sliders
  • Draggable and resizable windows
  • And more…

Do you mind publishing or opensourcing this example?

1 Like

woah :heart_eyes: lookin good

This text will be blurred

hollup wait this is goated feature