A few improvements to the drag-and-drop experience in our editor:
- You can drag-and-drop from “Files” to “Hierarchy” panel. This will add a child to the currently selected item in the tree view.
You can drag-and-drop images from “Files” to the central design area even when you’re not over a viewport. From such image, we will create
TCastleImageControl. You can also drag-and-drop with
Shiftpressed to force creating a
TCastleImageControl(instead of the default
TCastleImageTransform) even when dragging over a viewport.
You can drag-and-drop also
.castle-user-interfacefiles (will create a
TCastleDesignthat references them) or
.castle-transformfiles (will create
TCastleTransformDesignthat references them). If you want to test it out, see e.g. examples/advanced_editor/advanced_loading_designs project.
I also reported drag-and-drop bug with cursor on Lazarus GTK2 widgetset that affects us.
In effect (summing up previous and new features):
You can drag-and-drop various files from “Files” to “Hierarchy” or central design area.
You can drag-and-drop scene files (like glTF or X3D files) on the viewport to create
You can drag-and-drop sound files (like WAV or OggVorbis) on the viewport to create
You can drag-and-drop images (like PNG or JPG) on the viewport to create
TCastleImageTransformor on anything else (or hold Shift) to create
You can drag-and-drop UI designs (.castle-user-interface) to create
You can drag-and-drop transform designs (.castle-transform) to create
Enjoy, happy dragging and dropping 🙂
Start the discussion at Castle Game Engine Forum