Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/customDefinitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,10 @@ interface UIDragDetector extends UIComponent {
proposedRotation: number,
) => LuaTuple<[UDim2, number, Enum.UIDragDetectorDragRelativity?, Enum.UIDragDetectorDragSpace?]>,
): RBXScriptConnection;
SetDragStyleFunction(this: UIDragDetector, callback: (inputPosition: UDim2) => UDim2 | void): void;
SetDragStyleFunction(
this: UIDragDetector,
callback: (inputPosition: Vector2) => LuaTuple<[UDim2, number]> | UDim2 | void,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The space of the return values and the relativity of the motion are determined by the DragSpace and DragRelativity properties, unless overridden by returning a specified Enum.UIDragDetectorDragRelativity and Enum.UIDragDetectorDragSpace as the third and fourth return values.

Based on the docs, sounds like we need the tuple to possible supply an optional Enum.UIDragDetectorDragRelativity and Enum.UIDragDetectorDragSpace.

Is this rotation value optional?

): void;
}

/** @client */
Expand Down
5 changes: 4 additions & 1 deletion include/generated/None.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42192,7 +42192,10 @@ interface UIDragDetector extends UIComponent {
* @param this Instance which facilitates and encourages interaction with UI elements in an experience.
* @param function Function for monitoring `DragContinue` signals. This function receives the signal's screen space input position and returns a `UDim2` and float containing the desired motion of the drag in the desired space and relativity. If this function returns `nil`, the object will not be moved.
*/
SetDragStyleFunction(this: UIDragDetector, callback: (inputPosition: UDim2) => UDim2 | void): void;
SetDragStyleFunction(this: UIDragDetector, callback: (inputPosition: Vector2) => LuaTuple<[
UDim2,
number
]> | UDim2 | void): void;
/**
* Fires when a user continues dragging the UI element after `DragStart` has been initiated.
*
Expand Down
Loading