DragInputProperties
export type DragInputProperties = {
Instance: CanBeState<GuiObject>,
Enabled: CanBeState<boolean>?,
OnChange: ((newValue: Vector2) -> Vector2?)?,
getUseFunction: () -> Use?,
Value: CanBeValue<Vector2>,
Min: CanBeValue<Vector2>,
Max: CanBeValue<Vector2>,
Step: CanBeValue<Vector2>,
}
The DragInputProperties
table that is given to the getDragInput()
function that contains data about the desired values from the utility function.
Properties
Instance : CanBeState<GuiObject>
The Instance
the drag detection will be running on.
Enabled : CanBeState<boolean>?
Sets whether the drag input will be enabled or not. Can either be a State
containing a boolean
, or a boolean
.
OnChange : ((newValue: Vector2) -> Vector2?)?
The callback function that will be called when the Value
changes.
getUseFunction : () -> Use?
Settings this property will cause the State
, that the returned Use
function is from, to depend on certain internal values while the drag is happening. So when these internal values change, the State
which the Use
function belongs to will re-run again.
Value : CanBeValue<Vector2>
The initial value of the drag input. Can either be a Value
containing a Vector2
, or a Vector2
.
Min : CanBeValue<Vector2>
The minimum position that the drag can be started from.
Max : CanBeValue<Vector2>
The maximum position that the drag can be started from.
Step : CanBeValue<Vector2>
Determines how much the Value
will change when drag is applied.