Type Index Pages
- BillboardGui
- Frame
- Hint
- ImageButton
- ImageLabel
- PlayerGui
- ScreenGui
- ScrollingFrame
- StarterGui
- SurfaceGui
- TextBox
- TextButton
- TextLabel
- UIAspectRatioConstraint
- UIGradient
- UIGridLayout
- UIListLayout
- UIPadding
- UIPageLayout
- UIScale
- UISizeConstraint
- UITableLayout
- UITextSizeConstraint
- VideoFrame
- ViewportFrame
- ChangeHistoryService
- CoreGui
- DataModelSession
- DockWidgetPluginGui
- MultipleDocumentInterfaceInstance
- Plugin
- PluginAction
- PluginGui
- PluginGuiService
- PluginManager
- PluginMenu
- PluginMouse
- PluginToolbar
- PluginToolbarButton
- QWidgetPluginGui
- Selection
- StandalonePluginScripts
- StatsItem
- StudioService
- StudioTheme
No results found!
-
Instance
- GameSettings
- DebugSettings
- BodyMover
- WeldConstraint
- HttpRbxApiService
- NotificationService
- Translator
- Lighting
- Beam
- GuiService
- UserInputService
- Studio
- Plugin
- HttpService
- Mouse
- BindableEvent
- RunService
- Pages
- Humanoid
- TestService
- PathfindingService
- Chat
- NetworkPeer
- Feature
- CharacterAppearance
- Constraint
- NetworkReplicator
- JointInstance
- Light
- BasePlayerGui
- AnalyticsService
- NetworkMarker
- BinaryStringValue
- FlyweightService
- Geometry
- LoginService
- InstancePacketCache
- ThirdPartyUserService
- TouchInputService
- RuntimeScriptService
- GuidRegistryService
- PartOperationAsset
- DialogChoice
- PhysicsService
- AdService
- TextService
- MarketplaceService
- TeleportService
- Accoutrement
- GamePassService
- AssetService
- InsertService
- PointsService
- ChangeHistoryService
- ServerScriptService
- JointsService
- LogService
- InputObject
- Toolbar
- LuaSettings
- RenderSettings
- AnimationTrack
- PhysicsSettings
- NetworkSettings
- CFrameValue
- Animation
- Color3Value
- BoolValue
- BrickColorValue
- Vector3Value
- AnimationController
- BindableFunction
- Button
- Trail
- LocalizationTable
- LocalizationService
- DebuggerBreakpoint
- DebuggerWatch
- ScriptDebugger
- Animator
- Attachment
- RemoteFunction
- RemoteEvent
- PluginManager
- Camera
- Stats
- Sky
- StarterPlayer
- Dragger
- TerrainRegion
- Path
- TextFilterResult
- Dialog
- StatsItem
- GoogleAnalyticsConfiguration
- ScriptContext
- ControllerService
- CacheableContentProvider
- ReflectionMetadataClasses
- ReflectionMetadataEnums
- DebuggerManager
- GuiBase
- UIBase
- LuaSourceContainer
- GuiItem
- DataModelMesh
- ServiceProvider
- ReflectionMetadataItem
- PostEffect
- PhysicsPacketCache
- TouchTransmitter
- RobloxReplicatedStorage
- Visit
- LuaWebService
- ScriptService
- FlagStandService
- VirtualUser
- SpawnerService
- TimerService
- CookiesService
- Team
- GroupService
- StarterGear
- Message
- PlayerScripts
- Configuration
- ContentProvider
- CollectionService
- Debris
- ReplicatedFirst
- ServerStorage
- ReplicatedStorage
- Folder
- TweenService
- Players
- ContextActionService
- StarterPlayerScripts
- SoundService
- KeyframeSequenceProvider
- VRService
- PluginGuiService
- Player
- Teams
- Pose
- Keyframe
- KeyframeSequence
- IntConstrainedValue
- DoubleConstrainedValue
- ForceField
- RayValue
- Fire
- Smoke
- Sparkles
- ParticleEmitter
- IntValue
- StringValue
- NumberValue
- Explosion
- ObjectValue
- SoundGroup
- UserGameSettings
- ClickDetector
- Sound
- Selection
- BadgeService
- TaskScheduler
- GlobalDataStore
- DataStoreService
- CustomEvent
- CustomEventReceiver
- VirtualInputManager
- FunctionalTest
- TweenBase
- SoundEffect
- ReflectionMetadataEvents
- ClusterPacketCache
- PVInstance
- FaceInstance
- Controller
- ReflectionMetadataCallbacks
- ReflectionMetadataFunctions
- ReflectionMetadataYieldFunctions
- ReflectionMetadataProperties
- ReflectionMetadata
- AdvancedDragger
- HapticService
- FriendService
- GamepadService
No Result Found !!!
PluginDragDropped
This member cannot be used in scripts, but is usable in the command bar and plugins.
PluginDragDropped fires when the user releases their mouse over a PluginGui
during a drag operation started by Plugin/StartDrag
.
See also
PluginGui/PluginDragEntered
PluginGui/PluginDragLeft
PluginGui/PluginDragMoved
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
Code Samples
Plugin Drag and Drop
This code sample creates two plugin widget windows: a drag source and a drop target. In the source window, the script creates a TextBox
and TextButton
to allow the user to begin a plugin drag action. The drop target window will display the MimeType of whatever is dragged into it using a TextLabel
. If the MimeType is text/plain, it will display the plain text data instead. Pictured below is an animation of the drag and drop action.
To run this code sample as a plugin, paste it into a Script
. Then, right-click the script in the Explorer window and choose “Save as Local Plugin”.
-- This script must be run as a Studio plugin assert(plugin) local widgetInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, true, true, 300, 200) -- We'll start drags from this widget local dragSourceWidget = plugin:CreateDockWidgetPluginGui("Drag Source", widgetInfo) dragSourceWidget.Title = "Drag Source" -- This TextBox allows the user to type the text to drag local textBox = Instance.new("TextBox") textBox.Parent = dragSourceWidget textBox.Size = UDim2.new(1, 0, 0, 32) textBox.Text = "Hello, plugin drags" -- This TextButton will allow the user to start the drag local dragButton = Instance.new("TextButton") dragButton.Size = UDim2.new(1,0,1,-32) dragButton.Position = UDim2.new(0,0,0,32) dragButton.Text = "Edit the text above, then start drag here" dragButton.Parent = dragSourceWidget function onMouseButton1Down() local dragData = { Sender = "SomeDragSource"; MimeType = "text/plain"; Data = textBox.Text; MouseIcon = ""; DragIcon = ""; HotSpot = Vector2.new(0, 0); } plugin:StartDrag(dragData) end dragButton.MouseButton1Down:connect(onMouseButton1Down) -- This widget will receive drops local dragTargetWidget = plugin:CreateDockWidgetPluginGui("Drop Target", widgetInfo) dragTargetWidget.Title = "Drop Target" -- This TextLabel will display what was dropped local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.Text = "Drop here..." textLabel.Parent = dragTargetWidget local function onDragDrop(dragData) if dragData.MimeType == "text/plain" then textLabel.Text = dragData.Data else textLabel.Text = dragData.MimeType end end dragTargetWidget.PluginDragDropped:connect(onDragDrop) dragTargetWidget.PluginDragEntered:connect(function (dragData) print("PluginDragEntered") end) dragTargetWidget.PluginDragLeft:connect(function (dragData) print("PluginDragLeft") end) dragTargetWidget.PluginDragMoved:connect(function (dragData) print("PluginDragMoved") end)
How this site use cookies
This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.