mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
19 lines
364 B
GDScript
19 lines
364 B
GDScript
extends ColorPickerButton
|
|
|
|
func get_drag_data(_pos):
|
|
# Use another colorpicker as drag preview.
|
|
var cpb = ColorPickerButton.new()
|
|
cpb.color = color
|
|
cpb.rect_size = Vector2(50, 50)
|
|
set_drag_preview(cpb)
|
|
# Return color as drag data.
|
|
return color
|
|
|
|
|
|
func can_drop_data(_pos, data):
|
|
return typeof(data) == TYPE_COLOR
|
|
|
|
|
|
func drop_data(_pos, data):
|
|
color = data
|