From 8c91dadff7422c3f6ba5b259634e9ae64b5e270d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 22 Mar 2015 13:01:34 -0300 Subject: [PATCH] minor comments --- demos/gui/drag_and_drop/drag_and_drop.scn | Bin 2596 -> 2594 bytes demos/gui/drag_and_drop/drag_drop_script.gd | 17 +++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/demos/gui/drag_and_drop/drag_and_drop.scn b/demos/gui/drag_and_drop/drag_and_drop.scn index f2122a459e8d681b8d17c8c6507bf8cffb017083..94a25cc53e46546f5445dc7f825386149d699050 100644 GIT binary patch delta 403 zcmXwz&r6eW9LL{}(|wkP^C!bn{3yi?MFhLn-g~~!L2HBT2@HeUe3mJqLmeIRut{lj zZJLR7Z!caiJ6?2jUiXc`$yxx@1$-AE z{0ee9Ijq?`Pf-$yNDqFqm+EpGhzZ^acFPbG5oj z@BGi!#`0mqsPm&74eu2%;hGA(_%1Z?WkqL}^9wpXKU$}SeD#zJX?|IQ+3bZk)z6w1T ziu;6>v}ODkE7phq)Z*LeO|F_}6tA6Pwyfu@-rzC1ttZBP%9RIvjb4oeA8UI6 delta 405 zcmXwzJxCjI9ERUBCjYB~r&bA8#h;?6SX9uZi+S(<2Y%F`RR^(y`Lb2o7>S~TgC}Ce z)oksMSPJc0q)4+^P^42kxCrf#B4l&!Xs?4WJiOb(^S*7(0#AkqZfD4^?e z<3TWDuXOF}KLKFg@e~FN%4pS|h2N@9Wqy)WY2K8nx++824nPWKA4Wy2}g zg>t`wLq;iQh0b=KU|JO1?jj^PrPk#|Hj|dbtAPsH$P^x^$CAlPayj1nsZjT=zcRj> zk`za(HkOyt5`P(AS?y1}CcGWPJ99j}Fm8s{A%5|fj=#7oKx$%O&18?WKuAZd+9|S{ zQ7WH@d`9IAzo8l{61vl8gcwWvpP<%1m~_|p6qdA5p;ij@`B@ YKl^?`)B{JRYocBPFePv@VO|^m08jpES^xk5 diff --git a/demos/gui/drag_and_drop/drag_drop_script.gd b/demos/gui/drag_and_drop/drag_drop_script.gd index a99b963efa3..21a737ce1aa 100644 --- a/demos/gui/drag_and_drop/drag_drop_script.gd +++ b/demos/gui/drag_and_drop/drag_drop_script.gd @@ -1,27 +1,24 @@ extends ColorPickerButton -# member variables here, example: -# var a=2 -# var b="textvar" + +#virtual function func get_drag_data(pos): - #use another control as drag preview + #use another colorpicker as drag preview var cpb = ColorPickerButton.new() cpb.set_color( get_color() ) cpb.set_size(Vector2(50,50)) set_drag_preview(cpb) #return color as drag data return get_color() - + +#virtual function func can_drop_data(pos, data): return typeof(data)==TYPE_COLOR - + +#virtual function func drop_data(pos, data): set_color(data) -func _ready(): - # Initialization here - pass -