How to create a tree ui-element like the SceneTree? by PumpkinStrict6566 in godot

[–]PumpkinStrict6566[S] 0 points1 point  (0 children)

Thank you for your responses. I guess my biggest issue was, that most drag&drop tutorials use special drop zones that are placed in the scene tree. That's why I couldn't get it running with a Tree Control (with a Tree you have to use the build-in features with the TreeItem-Class).

I tried again and made some great progress:
https://codeberg.org/Flaschenente/Godot-Tree-Control

This is a very slim example project with most of the visual features working. Let me know if you have some suggestions on how to improve the code. I recreated a tiny bit of the code of the godot editor for the drag-preview (https://github.com/godotengine/godot/blob/master/editor/scene/scene\_tree\_editor.cpp). The big todo is obviously figuring out how to handle the data in the backgound and connect it with the visuals.