GuiObject:SetDragLimit

As a developer, it is currently too hard to create a constraint for things such as sliders for volume.
As I was making a music UI, specifically, the dragging volume bar, I thought this would be a useful feature:

GuiObject:SetDragLimit(UDim2.new(Size of the area in which the gui can be dragged around in.))

Along with this, I think there should be an option to whether use the dragging point as the center, 1px, or the whole size.
This would just make it all much easier. As well as give more potential to UI creators :smile: Such as a maze minigame :thinking:

8 Likes

I would actually love to have this. It would remove the need for tons of scripting for such a simple UI feature.

Aditionally, it should take another parameter, a UDim2 position, so you can set the position of the area where the object should be dragged.

GuiObject:SetDragLimit(UDim2.new(Position of the area on the screen),UDim2.new(Size of the area in which the gui can be dragged around in.))
3 Likes

Could make functional games like this easier…
https://gyazo.com/41c47820c302ddef80d05708fc7b3ec6

3 Likes

Seems like it would be more reasonable to have a constraint that kept it within some bounds.

5 Likes

You shouldn’t suggest exact APIs. Instead, consider using the format provided, and ROBLOX would find it far easier to consider your request.

Sometimes the format doesn’t help. This exact feature was my Request. And I don’t see how I could explain it any further anyway.

The format applies perfectly here:

As a Roblox developer, it is currently too hard to create working constraints for custom sliders like volume bars.

If Roblox is able to address your issue, how would it improve your game and/or your development experience? Please be as specific as possible.
I would use it to create better sliders outside of RbxUtility, and also restrict GUI dragging (lets say, puzzles, or inventory slots) in order to make a nicer and more robust system.

I don’t think you get what I mean - this is not the place to throw shower thoughts at, it is the place to propose a problem and request a solution. If you notice almost all the threads that have been made into features, they have followed this rule.

Feature Requests ~= Problem & Solution
Though I’ll try to include the format next time.

If you listen to ROBLOX staff talking about why feature requests are often not responded to at RDC US & UK, they explicitly state what I have just told you.

Then perhaps they should rename it from Feature Requests to Suggestions? Since what I posted was just a feature request. I simply requested to add this feature. If they don’t like it, fine by me, if they do, great.

1 Like

There is actually something for stuff like volume dragging bars which I’ve used before called RbxGui, some kind of module library thing that enables that. Looks like it’s depreciated now, though. Something like what you suggested would be great though.