the-lost-memory/project/addons/dialogic/Editor/TimelineEditor/EventButton.gd

17 lines
333 B
GDScript3
Raw Normal View History

2022-11-17 17:52:05 +00:00
tool
extends Button
export (String) var EventName = ''
func get_drag_data(position):
var preview_label = Label.new()
if (self.text != ''):
preview_label.text = text
else:
preview_label.text = 'Add Event %s' % [ EventName ]
set_drag_preview(preview_label)
return { "source": "EventButton", "event_name": EventName }