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 withShift
pressed to force creating aTCastleImageControl
(instead of the defaultTCastleImageTransform
) even when dragging over a viewport. -
You can drag-and-drop also
.castle-user-interface
files (will create aTCastleDesign
that references them) or.castle-transform
files (will createTCastleTransformDesign
that 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
TCastleScene
. -
You can drag-and-drop sound files (like WAV or OggVorbis) on the viewport to create
TCastleTransform
withTCastleSoundSource
. -
You can drag-and-drop images (like PNG or JPG) on the viewport to create
TCastleImageTransform
or on anything else (or hold Shift) to createTCastleImageControl
. -
You can drag-and-drop UI designs (.castle-user-interface) to create
TCastleDesign
. -
You can drag-and-drop transform designs (.castle-transform) to create
TCastleTransformDesign
.
Enjoy, happy dragging and dropping 🙂