minor comments
This commit is contained in:
parent
1e4841dc52
commit
8c91dadff7
2 changed files with 7 additions and 10 deletions
Binary file not shown.
|
@ -1,27 +1,24 @@
|
||||||
|
|
||||||
extends ColorPickerButton
|
extends ColorPickerButton
|
||||||
|
|
||||||
# member variables here, example:
|
|
||||||
# var a=2
|
#virtual function
|
||||||
# var b="textvar"
|
|
||||||
func get_drag_data(pos):
|
func get_drag_data(pos):
|
||||||
|
|
||||||
#use another control as drag preview
|
#use another colorpicker as drag preview
|
||||||
var cpb = ColorPickerButton.new()
|
var cpb = ColorPickerButton.new()
|
||||||
cpb.set_color( get_color() )
|
cpb.set_color( get_color() )
|
||||||
cpb.set_size(Vector2(50,50))
|
cpb.set_size(Vector2(50,50))
|
||||||
set_drag_preview(cpb)
|
set_drag_preview(cpb)
|
||||||
#return color as drag data
|
#return color as drag data
|
||||||
return get_color()
|
return get_color()
|
||||||
|
|
||||||
|
#virtual function
|
||||||
func can_drop_data(pos, data):
|
func can_drop_data(pos, data):
|
||||||
return typeof(data)==TYPE_COLOR
|
return typeof(data)==TYPE_COLOR
|
||||||
|
|
||||||
|
#virtual function
|
||||||
func drop_data(pos, data):
|
func drop_data(pos, data):
|
||||||
set_color(data)
|
set_color(data)
|
||||||
|
|
||||||
func _ready():
|
|
||||||
# Initialization here
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue