Garry's Mod Wiki

dragndrop

The drag'n'drop library, used internally by certain base panels to allow for drag'n'drop functionality, like spawnmenu's customizations.

Methods

dragndrop.CallReceiverFunction( boolean bDoDrop, number command, number mx, number my )
This is used internally - although you're able to use it you probably shouldn't. Calls the receiver function of hovered panel.
dragndrop.Clear()
Clears all the internal drag'n'drop variables.
dragndrop.Drop()
This is used internally - although you're able to use it you probably shouldn't. Handles the drop action of drag'n'drop library.
table dragndrop.GetDroppable( string name = nil )
Returns a table of currently dragged panels.
dragndrop.HandleDroppedInGame()
Allows you to capture the panel that was dropped into the game (dropped onto the root panel). This function is meant to be overridden.
dragndrop.HoverThink()
This is used internally - although you're able to use it you probably shouldn't. Handles the hover think. Called from dragndrop. Think.
boolean dragndrop.IsDragging()
Returns whether the user is dragging something with the drag'n'drop system.
dragndrop.StartDragging()
This is used internally - although you're able to use it you probably shouldn't. Starts the drag'n'drop.
dragndrop.StopDragging()
Stops the drag'n'drop and calls dragndrop. Clear.
dragndrop.Think()
This is used internally - although you're able to use it you probably shouldn't. Handles all the drag'n'drop processes. Calls dragndrop. UpdateReceiver and dragndrop. HoverThink.
dragndrop.UpdateReceiver()
This is used internally - although you're able to use it you probably shouldn't. Updates the receiver to drop the panels onto. Called from dragndrop. Think.