Merged "Scripts" and "Prefabs" folders into "src"

Made a new "src" folder that will contain the source code files, like all the GDScript and scene files. Please read this for more details: https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/

It made no sense to keep scenes separate from their scripts. More file organizing will follow soon.
This commit is contained in:
OverloadedOrama 2020-05-01 22:17:05 +03:00
parent 5a54235604
commit 646fc19a70
63 changed files with 135 additions and 113 deletions

View file

@ -0,0 +1,27 @@
extends Button
signal on_drop_data
export var index := 0;
export var color : Color = Color.white
export var draggable := false
var drag_preview_texture = preload("res://Assets/Graphics/Palette/swatch_drag_preview.png")
func get_drag_data(_position):
var data = null
if draggable:
data = {source_index = index}
var drag_icon = TextureRect.new()
drag_icon.texture = drag_preview_texture
drag_icon.modulate = color
set_drag_preview(drag_icon)
return data
func can_drop_data(_position, _data) -> bool:
return true
func drop_data(_position, data) -> void:
emit_signal("on_drop_data", data.source_index, index)