Difference between revisions of "GUIDragItem"
From Virtual World Web Wiki
(Documentation for the GUIDragItem class) |
(Documentation for the GUIDragItem class) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | A UI component designed to be dragged and dropped | ||
+ | |||
*'''Inherits class: [[GUIComponent]]''' | *'''Inherits class: [[GUIComponent]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:GUIDragItem Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:GUIDragItem Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:GUIDragItem Remarks}} | + | {{#ifexist:GUIDragItem Remarks|{{:GUIDragItem Remarks}}|}} |
===Properties=== | ===Properties=== | ||
Line 26: | Line 28: | ||
:{{CSharp|bool Enabled {get; set;} }} | :{{CSharp|bool Enabled {get; set;} }} | ||
− | |||
:{{CSharp|bool HideWhenNotDragging {get; set;} }} | :{{CSharp|bool HideWhenNotDragging {get; set;} }} | ||
:: | :: | ||
Line 56: | Line 57: | ||
===Events=== | ===Events=== | ||
− | :{{CSharp|OnClick( | + | :{{CSharp|OnClick()}} |
:: | :: | ||
::Event fired when the drag item is clicked on without dragging | ::Event fired when the drag item is clicked on without dragging | ||
− | :{{CSharp|OnDrop( | + | :{{CSharp|OnDrop()}} |
:: | :: | ||
::Event fired when the drag item is released after a drag | ::Event fired when the drag item is released after a drag | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 14:26, 15 January 2018
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