mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-16 15:10:20 +02:00
Added Drag n Drop Controls
This commit is contained in:
23
src/Menus/DragNDrop/DragSink.tscn
Normal file
23
src/Menus/DragNDrop/DragSink.tscn
Normal file
@@ -0,0 +1,23 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="GDScript" id=2]
|
||||
script/source = "extends Container
|
||||
#DropZone
|
||||
|
||||
#stuff can be dropped here
|
||||
func can_drop_data(_pos, data):
|
||||
return typeof(data) == TYPE_INT
|
||||
|
||||
#what is to be done when data is dropped
|
||||
func drop_data(_pos, data):
|
||||
print(data)
|
||||
"
|
||||
|
||||
[node name="DragSink" type="Container"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.789
|
||||
margin_bottom = -0.0200043
|
||||
script = SubResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
Reference in New Issue
Block a user