GUIDragItem
From Virtual World Web Wiki
A UI component designed to be dragged and dropped
- Inherits class: GUIComponent
- This is a JavaScript visible object
Remarks [edit]
Properties
- bool AllowDrag {get; set;}
- Can we drag this DragItem?
- bool AllowUIDrop {get; set;}
- Is this object supposed to drop onto the UI?
- bool AllowWorldDrop {get; set;}
- Is this object supposed to drop into the world?
- Color32 DisabledColor {get; set;}
- Color tint for the texture when disabled
- GUISprite DraggingTexture {get;}
- Reference to texture that displays when dragging
- bool Enabled {get; set;}
- bool HideWhenNotDragging {get; set;}
- Whether to hide the NormalTexture image (allows us to make a dragging image "appear" out of text or other components)
- Color32 HoverColor {get; set;}
- Color tint for the texture when hovering the mouse over it
- Color32 NormalColor {get; set;}
- Color tint for the texture
- GUISprite NormalTexture {get;}
- Reference to texture that displays normally
- Color32 PressedColor {get; set;}
- Color tint for the texture when pressed
- bool SnapToMouse {get; set;}
- Center the dragging image on the mouse, rather than preserve its original offset while dragging
- JSVector3 WorldDrop {get;}
- Raycasted location in world space where the drag item was released
Events
- OnClick()
- Event fired when the drag item is clicked on without dragging
- OnDrop()
- Event fired when the drag item is released after a drag